Red Hat Process Monitoring

1. Using ps aux,you can obtain a useful overview of all the processes running on the Red Hat. The a option means to show all processes, x means to show even processes that don’t have a control terminal, and u selects the “user oriented” output format. Here’s an example of ps aux output:

# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT TIME COMMAND
root 1111 0    0   0   0   ?   SN   0:00 /usr/sbin/sshd
root 1134 0    0   0   0   ?   Ss   0:00 rpc.statd
root 1235 0    0   0   0   ?   S    0:00 rpc.idmapd
root 1445 0    0   0   0   ?   Sroot 1556 0    0   0   0   ?   Ss   0:00 udevd
root 2134 0    0   0   0   ?   Sroot 2275 0    0   0   0   ?   SN   0:00 sendmail: accept
root 2545 0    0   0   0   ?   Sroot 2956 0    0   0   0   ?   SN   0:00 [ksoftirqd/0]

Additional note:
USER – Username of the process’s owner
PID – Process ID
%CPU – Percentage of the CPU this process is using
%MEM – Percentage of real memory this process is using
VSZ – Virtual size of the process
RSS – Resident set size (number of pages in memory)
TTY – Control terminal ID
STAT – Current process status:
R = Runnable D= In uninterruptible sleep
S = Sleeping (< 20 sec) T = Traced or stopped
Z = Zombie

Additional flags:
W = Process is swapped out
< = Process has higher than normal priority
N = Process has lower than normal priority
L = Some pages are locked in core
s = Process is a session leader
TIME CPU – time the process has consumed
COMMAND – Command name and arguments

2. Another useful set of arguments for Red Hat is lax, which provides more technical information. The a and x options are as above (show every process), and l selects the “long” output format. ps lax is also slightly faster to run than ps aux because it doesn’t have to translate every UID to a username. Below are ps lax example, includes fields such as the parent process ID (PPID), nice value (NI), and the type of resource on which the process is waiting (WCHAN).

# ps lax
F UID PID  PPID PRI NI VSZ  RSS WCHAN  STAT TIME COMMAND
1 0   1146 1    16  0  1221 482 syslog Ss   0:00 init [5]
1 0   1884 1    34  0     0 444 worker S    0:00 rpc.statd
5 32  1996 1    21  0     0 255 -      S    0:00 xinetd -sta
5 0   2186 1    17  0  2252 111 -      S1 26  2221 1    11  0  3345 764 syslog Ss   0:00 [events/0]
1 0   2377 1    16  0  5143 897 worker SN   0:00 klogd -x
5 33  2435 1    16  0  8895 210 syslog SN   0:00 sshd

You May Also Like

Leave a Reply?