-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Add an incus top
command
#701
Comments
Hey! @stgraber I'm a student at UT Austin (same virtualization class as other posters). Could I claim this issue? |
Sure! |
Hey @stgraber! I've gotten some work on this issue and had a few questions:
|
Not initially no. I suspect that down the line it will be expanded with more options on what columns to show, what columns to sort by, refresh interval, ... but none of that is needed for this initial implementation.
I think we should just compute the total CPU time in seconds, basically adding up user and system on all CPUs. |
Got it. Sounds good, I'll modify it accordingly. Relatedly I see that Lastly, for disk usage, the disk only reports information on reads/writes completed/ & total bytes read/written. The filesystem has information on "free space" and "total space" so I'm going to assume utilization is calculated as (total space - free space) / total space unless there's a different metric to use. |
MetricSet is an internal representation of those metrics on the server side, it's not a struct that's available to clients. Parsing those lines shouldn't be too difficult to do by hand. |
Yeah, that's right, the relevant thing is likely to be the filesystem metrics and you indeed get usage by deducting free from total. |
Closes lxc#701 Signed-off-by: Charan <charan.s@utexas.edu>
It would be nice to have an
incus top
command which accesses the metrics API (/1.0/metrics
) and renders a list of instances with their CPU, memory and disk usage columns (similar totop
).That should all be possible with our existing APIs, so it's just CLI work to implement such a command and provide some hotkeys to switch the column sorting and refresh frequency.
The text was updated successfully, but these errors were encountered: