top5_cpu_processes
The following commands show you the static cpu usage of your server:
ps -eo user,pcpu,pid,cmd --sort:-pcpu | head -6Shows more headers and information:
ps aux --sort:-pcpu | head -7Uses 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 |
top5_cpu_processes.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1