-
-
Notifications
You must be signed in to change notification settings - Fork 234
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 some CPU metrics in pmstat output #2006
Comments
@myllynen is this different to the -x option?
|
D'oh, I somehow completely missed that! But the extended metrics do not include guest time so I think that could be added. Thanks. |
Yep, missing & will be nice to have - thanks for checking. I'll queue it up but hopefully someone else drops in and fixes it in the meantime. |
This looks pretty straightforward but for the record few things I noticed:
user = s->val[cpu_nice].ull + s->val[cpu_user].ull; This is a bit unclear as in /proc/pid/stat utime includes guest_time according to the man page but nothing is stated for /proc/stat and guest times there so it's not entirely clear to me whether stolen time includes or is different from guest / guest_nice time? Thanks. |
Have a look at the way Mark setup the pmchart CPU and vCPU views are setup in terms of metrics used to answer this (note also vuser and vnice). |
I checked the kernel sources and the related git log: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/kernel/sched/cputime.c It looks like guest time is included in the user time since, at least since a couple of years ago. So this makes me think the above pasted calculations can be left as-is. Thanks. |
Recent versions of vmstat(8) report CPU wait, steal, and guest time that have become available in Linux kernel during the past few years. It could be nice if pmstat(1) would also report these additional CPU metrics as well. Thanks.
The text was updated successfully, but these errors were encountered: