快速业务通道

linux ps手册

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-28
6 ps - report a snapshot of the current processes.
7
8 SYNOPSIS
9 ps [options]
10
11
12
58 EXAMPLES
59 To see every process on the system using standard syntax:
60 ps -e
61 ps -ef
62 ps -eF
63 ps -ely
64
65 To see every process on the system using BSD syntax:
66 ps ax
67 ps axu
68
69 To print a process tree:
70 ps -ejH
71 ps axjf
72
73 To get info about threads:
74 ps -eLf
75 ps axms
76
77 To get security info:
78 ps -eo euser,ruser,suser,fuser,f,comm,label
79 ps axZ
80 ps -eM
81
82 To see every process running as root (real & effective ID) in user format:
83 ps -U root -u root u
84
85 To see every process with a user-defined format:
86 ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
87 ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
88 ps -eopid,tt,user,fname,tmout,f,wchan
89
90 Print only the process IDs of syslogd:
91 ps -C syslogd -o pid=
92
93 Print only the name of PID 42:
94 ps -p 42 -o comm=
95
96
97
98 SIMPLE PROCESS SELECTION
99 -A Select all processes. Identical to -e.
100
101
102 -N Select all processes except those that fulfill the specified
103 conditions. (negates the selection) Identical to --deselect.
104
105
106 T Select all processes associated with this terminal. Identical
107 to the t option without any argument.
108
109
110 -a Select all processes except session leaders (see getsid(2))
111 and processes not associated with a terminal.
112
113
114 a Lift the BSD-style "only yourself" restriction, which is
115 imposed upon the set of all processes when some BSD-style
116 (without "-") options are used or when the ps personality
117 setting is BSD-like. The set of processes selected in this
118 manner is in addition to the set of processes selected by
119 other means. An alternate description is that this option
120 causes ps to list all processes with a terminal (tty), or to
121 list all processes when used together with the x option.
122
123
124 -d Select all processes except session leaders.
125
126
127 -e Select all processes. Identical to -A.
128
129
130 g Really all, even session leaders. This flag is obsolete and
131 may be discontinued in a future release. It is normally
132 implied by the a flag, and is only useful when operating in
133 the sunos4 personality.
134
135
136 r Restrict the selection to only running processes.
137
138

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号