Often, when we see the process of PS, we can see the Stat column, indicating the status of the process;
[[Email protected] ~]# PS Axu
USER PID%cpu%MEM VSZ RSS TTY STAT START time COMMAND
Root 1 0.0 0.0 10368 148? Ss 0:02 init [3]
Root 2 0.0 0.0 0 0? s< 0:00 [migration/0]
Root 3 0.0 0.0 0 0? SN 0:00 [ksoftirqd/0]
Root 4 0.0 0.0 0 0? s< 0:00 [watchdog/0]
Root 5 0.0 0.0 0 0? s< 0:03 [events/0]
Root 6 0.0 0.0 0 0? s< 0:00 [Khelper]
Root 11 0.0 0.0 0 0? s< 0:00 [Kthread]
Root 15 0.0 0.0 0 0? s< 0:01 [kblockd/0]
Root 16 0.0 0.0 0 0? s< 0:00 [Kacpid]
Root 60 0.0 0.0 0 0? s< 0:00 [cqueue/0]
Root 1262 0.0 0.1 10128 576? Ss 0:01 syslogd-m 0
Root 1265 0.0 0.0 3824 288? Ss 0:00 Klogd-x
NSCD 1274 0.0 0.1 129572 952? SSL 0:09/USR/SBIN/NSCD
Root 1294 0.0 0.1 62648 768? Ss 0:00/usr/sbin/sshd
NTP 1307 0.0 1.0 19428 5120? SLs 0:02 ntpd-u ntp:ntp-p/var/run/ntpd.pid-g
Root 1331 0.0 0.2 74828 1152? Ss 0:00 Crond
Root 1336 0.0 0.0 31628 68? SSL 0:00/USR/SBIN/GSHELLD
Root 1345 0.0 0.1 3808 520 tty1 ss+ the 0:00/sbin/mingetty tty1
Root 1346 0.0 0.1 3808 520 Tty2 ss+ the 0:00/sbin/mingetty tty2
Root 2903 0.0 1.8 286532 9352? Sl 15:56/usr/local/aegis/alihids/alihids
Root 3480 0.0 0.3 77528 1944? Ss Jan05 0:00 screen-s Anders.zhangw
Root 3481 0.0 0.3 66084 1592 PTS/3 ss+ Jan05 0:00/bin/bash
Root 3493 0.0 0.3 66184 1644 PTS/4 ss+ Jan05 0:00/bin/bash
Root 3505 0.0 0.3 66084 1584 PTS/5 ss+ Jan05 0:00/bin/bash
Root 7527 0.0 0.3 77208 1736? Ss 0:00 screen-s Anders.zhangw
Root 7528 0.0 0.3 66084 1576 PTS/1 ss+
Root 7540 0.0 0.3 66084 1572 PTS/2 ss+
Root 12893 0.0 0.0 0 0? S Jan16 0:00 [Pdflush]
Root 12895 0.0 0.0 0 0? S Jan16 0:00 [Pdflush]
Root 15075 0.0 0.6 88080 3316? Ss 16:50 0:00 sshd: [Email protected]/0
Root 15079 0.0 0.3 66088 pts/0 Ss 16:50 0:00-bash
Root 15105 0.0 0.1 65608 988 pts/0 r+ 16:54 0:00 PS Axu
So, what does the status of the process mean?
D uninterruptible sleep (usually IO)
R running or runnable (on run queue)
S interruptible sleep (waiting for a event to complete)
T stopped, either by a job control signal or because it's being traced
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z Defunct ("zombie") process, terminated but not reaped by its parent
For BSD formats and when the STAT keyword are used, additional characters may be displayed:
< High-priority (not nice-to-other users)
N low-priority (Nice-to-other users)
L have pages locked to memory (for real-time and custom IO)
S is a session leader
L was multi-threaded (using Clone_thread, like NPTL pthreads do)
+ is in the foreground process group
Now, we can discuss the status change of Linux process in detail .... All of a sudden someone called to eat, then continue to eat after the amount
Linux process Status