Wiki/ps
Версія від 22:25, 10 квітня 2010, створена 94.248.119.71 (обговорення) (Created page with '== ps - Displays The Processes == Show Long Format Output # ps -Al To turn on extra full mode (it will show command line arguments passed to process): # ps -AlF To See Threads ...')
ps - Displays The Processes
Show Long Format Output
# ps -Al
To turn on extra full mode (it will show command line arguments passed to process):
# ps -AlF
To See Threads ( LWP and NLWP)
# ps -AlFH
To See Threads After Processes
# ps -AlLm
Print All Process On The Server
# ps ax # ps axu
Print A Process Tree
# ps -ejH # ps axjf # pstree
Print Security Information
# ps -eo euser,ruser,suser,fuser,f,comm,label # ps axZ # ps -eM
See Every Process Running As User Vivek
# ps -U vivek -u vivek u
Set Output In a User-Defined Format
# ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm # ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm # ps -eopid,tt,user,fname,tmout,f,wchan
Display Only The Process IDs of Lighttpd
# ps -C lighttpd -o pid=
OR
# pgrep lighttpd
OR
# pgrep -u vivek php-cgi
Display The Name of PID 55977
# ps -p 55977 -o comm=
Find Out The Top 10 Memory Consuming Process
# ps -auxf | sort -nr -k 4 | head -10
Find Out top 10 CPU Consuming Process
# ps -auxf | sort -nr -k 3 | head -10