-
Notifications
You must be signed in to change notification settings - Fork 5
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
Multi partition support #32
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8fe79f4
feat(math): Add RoundFloat function to work with primitive types
mertssmnoglu 70afe66
feat(disk-metrics): Add MountPoint field to DiskData
mertssmnoglu a891420
feat(disk-metrics): Enhance CollectDiskMetrics to include MountPoint …
mertssmnoglu 41e23e5
feat(disk-metrics): Rename MountPoint field to Device
mertssmnoglu 32892f2
ref(disk-metrics): Refactor CollectDiskMetrics to use Device instead …
mertssmnoglu 2efdc25
fix(disk-metrics): Set default Device value to "unknown" and improve …
mertssmnoglu 636c7e7
fix(disk-metrics): Exclude '/dev/loop' devices in CollectDiskMetrics
mertssmnoglu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This returns a lot of partitions that we aren't interested in, I think we need to refine how we parse out which partitions we want information on.
Is it possible to filter out all loopbacks? That would clean this up a lot.
Example, my current
lsblk
output which matches whatdisk.Partitions
returns:We're actually only interested in
nvme0n1
here, all the loops can be ignoredThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I'm thinking about reading only devices instead of mount points. This will show us
/dev/nvme0n1p2
=> 0.80 usage/dev/nvme0n1p1
=> 0.30 usage/dev/sda1
=> 0.70 usageI think this is more clear than the previous one.
(home, boot, efi, dev ...)
Preview
Are you ok with that? @ajhollid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mertssmnoglu I think that makes more sense! Sounds good to me 👍 Thanks for making the changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current changes should work for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mertssmnoglu sorry for the late reply, just having a chance to look at this now.
This is better, but I still have all the loop backs in my response:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mat be related to this issue, unless I'm reading that discussion incorreclty it seems that psutil ignores the
all
flag for all systems due to how BSD behaves 🤔This seems ot be the case, the output is the same whether I pass
true
orfalse
for the all flag.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's interesting. I added a new condition to if statement in 636c7e7