功能:显示后台进程的有关信息。单独使用ps将显示由当前终端启动的后台进程的PID、终端号、进程已执行时间以及启动该进程的命令
语法:ps -options
参数说明:
-e :显示系统内当前运行的所有后台进程
-f :除ps所提供的信息外,还显示用户名、PPID(父进程ID)及启动时间
-l :除ps所提供的信息外,还显示 User ID, PPID 和进程优先级
示例:
# ps
PID TTY TIME CMD
2949276 pts/0 0:00 -ksh
5832858 pts/0 0:00 ps
5898302 pts/0 0:00 -ksh
6029322 pts/0 0:00 -ksh
# ps -e
PID TTY TIME CMD
1 - 0:00 init
524344 - 0:00 shlap64
1441996 - 0:00 srcmstr
1900746 - 0:00 tier1slp
2162770 - 0:00 errdemon
2293904 - 0:02 syncd
2687062 - 0:00 portmap
2818280 - 0:00 cimssys
2883694 - 0:00 aixmibd
2949276 pts/0 0:00 ksh
3014750 - 0:00 cimssys
3080290 - 0:24 java
3145870 - 0:00 rmcd
3211422 - 0:01 getty
3276908 - 0:00 inetd
3342510 - 0:00 topasrec
3408050 - 0:14 java
3473530 - 0:00 uprintfd
3539188 - 0:00 IBM.ServiceRMd
3604596 - 0:00 biod
3670132 - 0:00 CIM_diagd
3735666 - 0:00 snmpdv3ne
3801252 - 0:00 rpc.lockd
3866744 - 0:00 slp_srvreg
3932296 - 0:00 sendmail
3997746 - 0:00 nonstop_aix
4063358 - 0:00 dirsnmpd
4129022 - 0:00 telnetd
4325564 - 0:00 rpc.statd
4391052 - 0:00 snmpmibd
4522030 - 0:00 sshd
4587666 - 0:00 hostmibd
4653106 - 0:00 cron
4718622 - 0:00 syslogd
4784288 - 0:00 writesrv
4915356 - 0:00 qdaemon
4980942 - 0:00 dtlogin
5046500 - 0:00 IBM.DRMd
5111976 - 0:00 sshd
5308578 - 0:02 cimserver
5374128 - 0:00 ksh
5439724 - 0:00 ksh
5505194 - 0:00 cimlistener
5636274 - 0:00 clstrmgr
5767368 - 0:00 clcomd
5832860 pts/0 0:00 ps
5898302 pts/0 0:00 ksh
6029322 pts/0 0:00 ksh
6357244 - 0:00 sftp-server
6488270 - 0:00 IBM.CSMAgentRMd
# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 23:38:00 - 0:00 /etc/init
root 524344 1 0 23:38:05 - 0:00 /usr/ccs/bin/shlap64
root 1441996 1 0 23:39:05 - 0:00 /usr/sbin/srcmstr
root 1900746 1 0 23:39:07 - 0:00 /opt/ibm/director/cimom/bin
root 2162770 1 0 23:38:59 - 0:00 /usr/lib/errdemon
root 2293904 1 0 23:38:59 - 0:02 /usr/sbin/syncd 60
root 2687062 1441996 0 23:39:11 - 0:00 /usr/sbin/portmap
root 2818280 1441996 0 23:39:06 - 0:00 /opt/freeware/cimom/pegasus
root 2883694 1441996 0 23:39:11 - 0:00 /usr/sbin/aixmibd
root 2949276 4129022 0 00:01:51 pts/0 0:00 -ksh
root 3014750 1441996 0 23:39:07 - 0:00 /opt/freeware/cimom/pegasus
root 3080290 3997746 0 23:39:24 - 0:24 /var/opt/tivoli/ep/_jvm/jre
root 3145870 1441996 0 23:39:35 - 0:00 /usr/sbin/rsct/bin/rmcd -a
root 3211422 1 0 23:39:50 - 0:01 /usr/sbin/getty /dev/consol
root 3276908 1441996 0 23:39:11 - 0:00 /usr/sbin/inetd
root 3342510 1 0 23:39:35 - 0:00 /usr/bin/topasrec -L -s 30
pconsole 3408050 5439724 0 23:39:36 - 0:14 /usr/java5/bin/java -Xmx512
root 3473530 1 0 23:39:14 - 0:00 /usr/sbin/uprintfd
root 3539188 1441996 0 23:39:43 - 0:00 /usr/sbin/rsct/bin/IBM.Serv
root 3604596 1441996 0 23:39:12 - 0:00 /usr/sbin/biod 6
root 3670132 1 0 23:39:08 - 0:00 /opt/freeware/cimom/pegasus
root 3735666 1441996 0 23:39:07 - 0:00 /usr/sbin/snmpd
root 3801252 1441996 0 23:39:13 - 0:00 /usr/sbin/rpc.lockd -d 0
root 3866744 1 0 23:39:07 - 0:00 ./slp_srvreg -D
root 3932296 1441996 0 23:39:11 - 0:00 sendmail: accepting connect
root 3997746 1 0 23:39:23 - 0:00 bin/nonstop_aix @config/non
root 4063358 1 0 23:39:08 - 0:00 /opt/ibm/icc/cimom/bin/dirs
root 4129022 3276908 0 00:01:51 - 0:00 telnetd -a
daemon 4325564 1441996 0 23:39:13 - 0:00 /usr/sbin/rpc.statd -d 0 -t
root 4391052 1441996 0 23:39:12 - 0:00 /usr/sbin/snmpmibd
root 4522030 5111976 0 01:23:01 - 0:00 sshd: root@notty
root 4587666 1441996 0 23:39:11 - 0:00 /usr/sbin/hostmibd
root 4653106 1 0 23:39:14 - 0:00 /usr/sbin/cron
root 4718622 1441996 0 23:39:11 - 0:00 /usr/sbin/syslogd
root 4784288 1441996 0 23:39:14 - 0:00 /usr/sbin/writesrv
root 4915356 1441996 0 23:39:14 - 0:00 /usr/sbin/qdaemon
root 4980942 1 0 23:39:36 - 0:00 /usr/dt/bin/dtlogin -daemon
root 5046500 1441996 0 23:39:43 - 0:00 /usr/sbin/rsct/bin/IBM.DRMd
root 5111976 1441996 0 23:39:33 - 0:00 /usr/sbin/sshd
root 5308578 1 0 23:39:16 - 0:02 [cimserve]
root 5374128 1441996 0 23:39:35 - 0:00 /bin/ksh /pconsole/lwi/bin/
pconsole 5439724 5374128 0 23:39:35 - 0:00 /bin/ksh /pconsole/lwi/bin/
root 5505194 1 0 23:39:22 - 0:00 /usr/bin/cimlistener
root 5636274 1441996 0 23:39:39 - 0:00 /usr/es/sbin/cluster/clstrm
root 5767368 1441996 0 23:39:39 - 0:00 /usr/es/sbin/cluster/clcomd
root 5832862 5898302 0 01:52:03 pts/0 0:00 ps -ef
root 5898302 6029322 0 01:40:43 pts/0 0:00 -ksh
oracle 6029322 2949276 0 01:37:24 pts/0 0:00 -ksh
root 6357244 4522030 0 01:23:04 - 0:00 /usr/sbin/sftp-server
root 6488270 1441996 0 23:39:42 - 0:00 /usr/sbin/rsct/bin/vac8/IBM
# ps -efl
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
200003 A root 1 0 0 60 20 1030106000 704 23:38:00 - 0:00 /etc/init
240001 A root 524344 1 0 60 20 106806d400 168 f10001003c552598 23:38:05 - 0:00 /usr/ccs/bin/shlap64
240001 A root 1441996 1 0 60 20 10b0196400 980 23:39:05 - 0:00 /usr/sbin/srcmstr
240001 A root 1900746 1 0 60 20 106820d400 5220 f1000110091767b0 23:39:07 - 0:00 /opt/ibm/director/cimom/bin/tier1slp
40401 A root 2162770 1 0 60 20 105818b400 632 f10001001980d048 23:38:59 - 0:00 /usr/lib/errdemon
240001 A root 2293904 1 0 60 20 1098093400 576 * 23:38:59 - 0:02 /usr/sbin/syncd 60
240001 A root 2687062 1441996 0 60 20 1000240400 1004 23:39:11 - 0:00 /usr/sbin/portmap
240001 A root 2818280 1441996 0 60 20 10401a8400 308 f1000500043b2cc8 23:39:06 - 0:00 /opt/freeware/cimom/pegasus/bin/cimssys platform_agent
240001 A root 2883694 1441996 0 60 20 10e025c400 1492 23:39:11 - 0:00 /usr/sbin/aixmibd
240001 A root 2949276 4129022 0 60 20 1078c0f400 788 00:01:51 pts/0 0:00 -ksh
240001 A root 3014750 1441996 0 60 20 10b8217400 304 f1000500002a10c8 23:39:07 - 0:00 /opt/freeware/cimom/pegasus/bin/cimssys cimsys
242001 A root 3080290 3997746 0 60 20 10d84fb400 76176 * 23:39:24 - 0:24 /var/opt/tivoli/ep/_jvm/jre/bin/java -Xmx384m -Xminf0.01 -Xmaxf0.4 -Dsun.rmi.dgc
340801 A root 3145870 1441996 0 39 20 1088631400 2296 f1000f0a10006c40 23:39:35 - 0:00 /usr/sbin/rsct/bin/rmcd -a IBM.LPCommands -r
240001 A root 3211422 1 0 60 20 10d089a400 684 f100010039f050c0 23:39:50 - 0:01 /usr/sbin/getty /dev/console
240001 A root 3276908 1441996 0 60 20 10e825d400 592 23:39:11 - 0:00 /usr/sbin/inetd
40503 A root 3342510 1 0 58 -- 10c8659400 1256 f100011008f752b0 23:39:35 - 0:00 /usr/bin/topasrec -L -s 0:00 /usr/sbin/rsct/bin/vac8/IBM.CSMAgentRMd
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) | Powered by Discuz! X3.2 |