The following commands show you the static cpu usage of your server:
ps -eo user,pcpu,pid,cmd --sort:-pcpu | head -6
Shows more headers and information:
ps aux --sort:-pcpu | head -7
Uses the sort command of --sort
ps -eo user,pcpu,pid,cmd | sort -r -k2 | head -6
\\
\\
It is important to inspect the 'State' column when investigating processes. Below are the flat definitions:
^ State ^ Definition ^
| D | uninterruptible sleep (usually IO) |
| R | running or runnable (on run queue) |
| S | interruptible sleep (waiting for an event to complete) |
| T | stopped, either by a job control signal or because it is being traced |
| X | dead (should never be seen) |
| Z | defunct ("zombie") process, terminated but not reaped by its parent |
| | |
| < | high-priority (not nice to other users) |
| N | low-priority (nice to other users) |
| L | has pages locked into memory (for real-time and custom IO) |
| s | is a session leader |
| l | is multi-threaded (using CLONE_THREAD, like NPTL pthreads do) |
| + | is in the foreground process group |