PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1064 mysql 2008860762097408388 S 0.05.462:41.20 /usr/sbin/mysqld 23396 varnish 20028649211561683572 S 0.03.00:42.24 /usr/sbin/varnishd -P /var/run/varnish.pid -f /etc/varnish/default.vcl -a :82 -T 127.0.0.1:6082 -S /etc/varnish/secret -s malloc,256M 1105 named 2003117121082042424 S 0.02.80:16.41 /usr/sbin/named -u named -c /etc/named.conf 23377 nobody 200153240894322432 S 0.02.34:35.74 nginx: worker process 23376 nobody 200147096833162416 S 0.02.12:18.09 nginx: worker process 23375 root 200131028667641616 S 0.01.70:01.07 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf 23378 nobody 20013098864592592 S 0.01.70:00.51 nginx: cache manager process 1135 root 20086708375722252 S 0.01.00:20.18 cwpsrv: worker process 1133 root 20086708375442212 S 0.01.00:05.94 cwpsrv: worker process 3034 root 20086704367401452 S 0.00.90:00.09 cwpsrv: master process /usr/local/cwpsrv/bin/cwpsrv 1067 nobody 2001356200315882352 S 0.00.80:56.06 /usr/local/apache/bin/httpd -k start 977 nobody 2001356088312682372 S 0.00.80:30.44 /usr/local/apache/bin/httpd -k start 968 nobody 2001356216305442348 S 0.00.80:19.95 /usr/local/apache/bin/httpd -k start
如果你只想查看命令名称而不是命令的绝对路径,请使用下面的 top 命令格式。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# top -b -o +%MEM | head -n 20 | tail -15
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1064 mysql 2008860762103408388 S 6.75.462:40.93 mysqld 23396 varnish 20028649211561683572 S 0.03.00:42.24 cache-main 1105 named 2003117121082042424 S 0.02.80:16.41 named 23377 nobody 200153240894322432 S 13.32.34:35.74 nginx 23376 nobody 200147096833162416 S 0.02.12:18.09 nginx 23375 root 200131028667641616 S 0.01.70:01.07 nginx 23378 nobody 20013098864592592 S 0.01.70:00.51 nginx 1135 root 20086708375722252 S 0.01.00:20.18 cwpsrv 1133 root 20086708375442212 S 0.01.00:05.94 cwpsrv 3034 root 20086704367401452 S 0.00.90:00.09 cwpsrv 1067 nobody 2001356200315882352 S 0.00.80:56.04 httpd 977 nobody 2001356088312682372 S 0.00.80:30.44 httpd 968 nobody 2001356216305442348 S 0.00.80:19.95 httpd