拓冰建站拓冰建站
首页 / 资讯中心 / 正文

【2015-01-30】linux显示进程命令ps简单笔记

[历史归档]本文原发布于 cstriker1407.info 个人博客内容为历史存档仅供参考。发布时间2015-01-30 标题linux显示进程命令ps简单笔记分类操作系统 / linux 标签linux·常用命令·pslinux显示进程命令ps简单笔记命令帮助常用命令ps -ef:ps -e f:ps -ef f:ps是一个很常用的命令这里简单的笔记下。命令帮助cstriker1407cstriker1407-x64:~$ ps--help allUsage: ps Basic options:-A,-eallprocesses-aallwithtty,exceptsessionleaders aallwithtty,including other users-dallexceptsessionleaders-N,--deselect negate selectionr only running processes Tallprocessesonthis terminal x processes without controlling ttys Selectionbylist:-Ccommandcommand name-G,--Group gid real group id or name-g,--group group session or effective group name-p,--pid pid process id--ppid pid select by parent process id-s,--sid session session id-t,t,--tty tty terminal-u,U,--user uid effective user id or name-U,--User uid real user id or nameselectionargumentstake either: comma-separated list e.g.-u root,nobodyorblank-separated list e.g.-p 123 4567Output formats:-F extrafull-ffull-format,including commandlinesf,--forest ascii art process tree-Hshowprocess hierarchy-j jobs format j BSD job control format-l long format l BSD long format-M,Zaddsecuritydata(forSELinux)-OformatpreloadedwithdefaultcolumnsOformatas-O,withBSD personality-o,o,--format formatuserdefined format s signal format uuser-oriented format v virtual memory format X register format-ydonotshowflags,showrrs vs.addr(usedwith-l)--context display security context (for SELinux)--headers repeat header lines, one per page--no-headers do not print header at all--cols, --columns, --width numsetscreen width--rows, --lines numsetscreen heightShowthreads: Hasiftheywhereprocesses-L possiblywithLWPandNLWPcolumns-m,mafterprocesses-T possiblywithSPIDcolumnMiscellaneous options:-cshowscheduling classwith-loptioncshowtruecommand name eshowthe environmentaftercommand k,--sort specify sort order as: [|-]key[,[|-]key[,...]]L list format specifiers n displaynumericuidandwchan S,--cumulative include some dead child process data-ydonotshowflags,showrss(onlywith-l)-V,V,--version display version information and exit-w,w unlimited output width--help simple|list|output|threads|misc|alldisplay helpandexitFormore details see ps(1).常用命令ps的命令参数非常复杂而且一般和grep相组合使用因此这里只简单的笔记下几种最简单的参数。以后的随用随笔记把。ps -ef:显示全部的进程并显示全部的进程信息。ps -e f:显示全部的进程并用树形信息打印出来。ps -ef f:显示全部的进程显示全部的进程信息并用树形信息打印出来。
分享:

看完干货,该让你的企业上线了

免费需求沟通 · 48 小时内出具建站方案 · 河南本地可上门