2008年3月13日 星期四

Linux Command - ps

show the current processes in the tree shape
# ps axjf

normal show all the current processes
# ps auxwww
or
# ps aux (seems the same as the above command)

See the difference of 2 kinds of fully ps show
# ps -auxwww | head -1
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
# ps -eLf | head -1
UID PID PPID LWP C NLWP STIME TTY TIME CMD



#To get info about threads:
# ps -eLf
# ps axms

If we use "-f" and "-L" parameter of ps, it will add
NLWP (number of threads)
LWP (thread ID)
to display the thread informations
-f does full-format listing. This option can be combined with many other
UNIX-style options to add additional columns. It also causes the command
arguments to be printed. When used with -L, the NLWP (number of threads) and
LWP (thread ID) columns will be added. See the c option, the format keyword
args, and the format keyword comm.

沒有留言: