-
Notifications
You must be signed in to change notification settings - Fork 55
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
Top CPU consumers missorted #203
Comments
Hi @mauved thanks for taking the time in opening and documenting this issue. Hmmm, seems like a newer version of CentOS 7
I'll get this fixed, thanks!! |
The field was added in version 11.5.5: https://github.com/sysstat/sysstat/blob/master/CHANGES#L269 These are the pidstat versions per distro supported: Red Hat based:
Debian based:
*Affected |
@mauved I got a fix in #204. Would you mind giving it a look and provide any feedback you may have? Thanks! Tests of the new way to calculate the %CPU field: u14:
u16:
u18
c6:
c7:
d8:
d9:
d10(buster):
f29:
|
Test: CentOS 6
Test: CentOS 7
Test: Fedora 29
Test: Debian Stretch
Test: Debian Buster/Sid
Test: Ubuntu 16.04
I tested on a bunch of OSs and it looks good now! Test results posted below. Test: Ubuntu 18.04
|
Whoops, goofed up my previous post a bit. I tested recap in a handful of OSs and the sorting looks good now. |
Yay!, thanks for checking! |
Fixed in #204 |
The top CPU consumers in the resources file are not being sorted correctly on both older and newer operating systems. The pidstat version check seems to result in the 7th column always being used as the sorting key.
recap/src/core/resources
Lines 112 to 128 in 4ceb5be
I did some testing to be sure. I ran
nice -n $(( RANDOM % 40 - 20 )) stress -c 1 -q &
a few times to get a good list of processes of varying CPU loads, then manually executedrecap
after I had a sufficient number ofstress
processes running.Test 1: Fedora 29
Test 2: CentOS 6
The text was updated successfully, but these errors were encountered: