solaris系统用ps命令查看进程占用的CPU、内存等情况
2013-07-14 20:12:03 来源:WEB开发网 用PS命令的-o选项来实现,这些选项有:user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid ctid
pri opri pcpu pmem vsz rss osz nice class time etime stime zone zoneid
f s c lwp nlwp psr tty addr wchan fname comm args projid project pset
例: ps -efo user,pid,ppid,pcpu,pmem,comm
例:# ps -efo uid,pid,ppid,pcpu,pmem,vsz,rss,osz,etime,stime,comm | grep php
48 939 938 0.1 0.2 22696 11304 2837 04:36 14:55:58 /usr/local/webserver/php/bin/php-cgi
48 952 938 2.0 0.2 22712 11336 2839 04:36 14:55:58 /usr/local/webserver/php/bin/php-cgi
48 945 938 2.9 0.2 22720 11808 2840 04:36 14:55:58 /usr/local/webserver/php/bin/php-cgi
48 938 1 0.0 0.1 18368 7840 2296 04:36 14:55:58 /usr/local/webserver/php/bin/php-cgi
各选项的含义:
he following names are recognized in the POSIX locale:
user The effective user ID of the process. This will be the textual user ID, if it can be
obtained and the field width permits, or a decimal representation otherwise.
ruser The real user ID of the process. This will be the textual user ID, if it can be
obtained and the field width permits, or a decimal representation otherwise.
group The effective group ID of the process. This will be the textual group ID, if it can be
obtained and the field width permits, or a decimal representation otherwise.
rgroup The real group ID of the process. This will be the textual group ID, if it can be
obtained and the field width permits, or a decimal representation otherwise.
pid The decimal value of the process ID.
ppid The decimal value of the parent process ID.
pgid The decimal value of the process group ID.
pcpu The ratio of CPU time used recently to CPU time available in the same period, expressed
as a percentage. The meaning of ``recently'' in this context is unspecified. The CPU time
available is determined in an unspecified manner.
vsz The total size of the process in virtual memory, in kilobytes.
nice The decimal value of the system scheduling priority of the process. See nice(1).
etime In the POSIX locale, the elapsed time since
the process was started, in the form:
[[dd-]hh:]mm:ss
where
dd is the number of days
hh is the number of hours
mm is the number of minutes
ss is the number of seconds
The dd field will be a decimal integer. The hh, mm and ss fields will be two-digit
decimal integers padded on the left with zeros.
time In the POSIX locale, the cumulative CPU time of the process in the form:
更多精彩
赞助商链接