When running ps without -H (show all threads), only one thread's %CPU is shown. This can be very misleading: if a process has one idle thread and other busy threads and ps(1) can report 0% cpu. How-To-Repeat: Run ps with and without -H, and compare the %CPU data [emaste@ref8-amd64 ~]$ ps -a -x -p 11 -opid,lwp,comm,tdnam,%cpu PID LWP COMMAND TDNAM %CPU 11 100010 idle 100.0 [emaste@ref8-amd64 ~]$ ps -a -x -H -p 11 -opid,lwp,comm,tdnam,%cpu PID LWP COMMAND TDNAM %CPU 11 100003 idle idle: cpu7 99.9 11 100004 idle idle: cpu6 100.0 11 100005 idle idle: cpu5 74.9 11 100006 idle idle: cpu4 91.7 11 100007 idle idle: cpu3 96.1 11 100008 idle idle: cpu2 100.0 11 100009 idle idle: cpu1 100.0 11 100010 idle idle: cpu0 100.0 Note %CPU comes from just the last thread in this case. Other per-thread data probably has the same problem.
Not reproducible on stable/9: feynman% ps -a -x -p 11 -opid,lwp,comm,tdnam,%cpu PID LWP COMMAND TDNAM %CPU 11 100010 idle 725.7 feynman% ps -a -x -H -p 11 -opid,lwp,comm,tdnam,%cpu PID LWP COMMAND TDNAM %CPU 11 100003 idle/idle: cpu0 idle: cpu0 86.4 11 100004 idle/idle: cpu1 idle: cpu1 93.2 11 100005 idle/idle: cpu2 idle: cpu2 89.8 11 100006 idle/idle: cpu3 idle: cpu3 91.7 11 100007 idle/idle: cpu4 idle: cpu4 93.3 11 100008 idle/idle: cpu5 idle: cpu5 88.6 11 100009 idle/idle: cpu6 idle: cpu6 88.2 11 100010 idle/idle: cpu7 idle: cpu7 91.1
fixing resolution.
This should be "FIXED", I just didn't find out when the fix landed.
sorry, was testing something, needed a real bug :-\