Linux 經常使用ps命令

(1)查看系統全部進程:安全

標準格式:       
          ps -e
          ps -ef
          ps -eF
          ps -ely
 
BSD格式:
          ps ax
          ps axu
 
(2)打印進程樹
          ps -ejH
          ps axjf
 
(3)得到線程信息:
          ps -eLf
          ps axms
 
(4)得到安全信息:
          ps -eo euser,ruser,suser,fuser,f,comm,label
          ps axZ
          ps -eM
 
(5)查看root用戶進程:
          ps -U root -u root u
 
(6)自定義格式查看全部進程
          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
 
(7)打印單個程序進程:
          ps -C syslogd -o pid=
 
(8)打印進程名:
          ps -q 42 -o comm=
相關文章
相關標籤/搜索