Record IO MiB read/write to client resource usage records#275
Open
tsehori wants to merge 43 commits intogoogle:masterfrom
Open
Record IO MiB read/write to client resource usage records#275tsehori wants to merge 43 commits intogoogle:masterfrom
tsehori wants to merge 43 commits intogoogle:masterfrom
Conversation
added 30 commits
August 3, 2020 14:07
…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.
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
added 7 commits
September 23, 2020 11:59
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.
This file contains hidden or 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
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_recordsin 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_mibetc.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]/ioas 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_countersin 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.