-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record IO MiB read/write to client resource usage records #275
Open
tsehori
wants to merge
43
commits into
google:master
Choose a base branch
from
tsehori:add_resource_usages
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…d_resource_usages
Added all relevant SQL statements and pieces for ClientIOWrite, so the columns MaxIoWriteMib and MeanIoWriteMib are added to the SQL database.
…d_resource_usages
…d_resource_usages
…d_resource_usages
Changed the existing format of (mean|max)_io_(read|write)_mib to format (mean|max)_io_(read|write) in order to be consistent with memory field.
tsehori
changed the title
Record IO bytes read/write to client resource usage records
Record IO MiB read/write to client resource usage records
Sep 23, 2020
mbushkov
requested changes
Sep 23, 2020
fleetspeak/src/client/internal/monitoring/resource_usage_fetcher.go
Outdated
Show resolved
Hide resolved
fleetspeak/src/client/internal/monitoring/resource_usage_fetcher_unix.go
Outdated
Show resolved
Hide resolved
fleetspeak/src/common/proto/fleetspeak_monitoring/resource.proto
Outdated
Show resolved
Hide resolved
IORead to IOReadBytes and IOWrite to IOWriteBytes.
All the newly added aggregated RUD fields, MeanIoRead, MaxIoRead, MeanIoWrite, MaxIoWrite, were in MiB (similar to Mean/MaxResidentMemory). Those are now changed to KiB instead of MiB.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The table
client_resource_usage_records
in Fleetspeak's database (MySQL, SQLite) contains many important details about a Fleetspeak client such asmean_user_cpu_rate
,mean_system_cpu_rate
,max_resident_memory_mib
etc.We'd like to amend this table with a few more resource usage records. In this PR, I want to add IO bytes read/write, recorded using gopsutil.
Note that I'm using gopsutil instead of reading directly off of
/proc/[pid]/io
as the rest of the unix code suggets (for example, like the way resident memory is recorded), as it seems that gopsutil can do it too with Linux distributions (look upio_counters
in the docs).One thing to note is that this PR is not complete and not ready to be merged, as it lacks tests, which I'm unsure at the moment of how to conduct regarding IO usage.I'm also open for discussions and arguments regarding the code itself; I've used similar code to the one that records resident memory, as it seems the most fitting to the IO usage scenario.