I've seen a few posts similar to this, most notably here, but wasn't quite satisfied with the answers. I'm comparing
ps results on a specific process and see huge discrepancies in CPU usage.
top varies between <1% and 100% from interval to interval including periods of sustained highs (>50% for 3-4 intervals), while
ps is steady at 2.2%. The process I'm watching doesn't have any children or anything, so I'm not quite sure what to make of it. Since there are sustained high periods in
top, I feel I can rule out sampling interval.
Is this really just a discrepancy in how these two tools handle I/O wait time, as suggested by the question I linked to above?
I've seen it fluctuate to 2.1% in
ps, but that's it so far. Output from
top -p 4522:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4522 root 16 0 340m 316m 4732 R 54.7 1.3 508:57.46 maui
ps u -p 4522:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 4522 2.2 1.3 348764 324456 ? Ss Aug25 509:25 /usr/local/maui/sbin/maui