atop icon indicating copy to clipboard operation
atop copied to clipboard

The parsable output (current CPU) can be incorrect when a process is exiting.

Open gleventhal opened this issue 2 years ago • 0 comments

I noticed that atop was reporting my pinned process on core 0 but its pinned elsewhere.

I double-checked and saw that it incorrectly shows 0 when this process is exiting.

# The first token matches PRC and the 3rd from last ( current CPU ) matches 0
atop -r -PPRC | awk '$1 == "PRC" && $(NF - 3) == 0'   

Sometimes when a process is exiting, the UI shows "--" for CPU, I suspect this might just be turning this non-value into an int, but it's misleading since Core 0 is a specific scheduling entity. Perhaps Parsable output can use -1 or -- or NULL ?

gleventhal avatar Jul 05 '22 15:07 gleventhal