标签:sort 内存 2.3 serve command 连接 roo 使用 net
一、top
top -c 显示完整的进程信息
top - 11:05:30 up 148 days, 21:18, 4 users, load average: 12.91, 13.34, 13.04 Tasks: 465 total, 12 running, 453 sleeping, 0 stopped, 0 zombie Cpu0 : 74.8%us, 5.0%sy, 0.0%ni, 18.2%id, 0.0%wa, 0.0%hi, 0.3%si, 1.7%st Cpu1 : 73.5%us, 5.0%sy, 0.0%ni, 20.1%id, 0.0%wa, 0.0%hi, 0.3%si, 1.0%st Cpu2 : 75.7%us, 4.7%sy, 0.0%ni, 18.0%id, 0.0%wa, 0.0%hi, 0.3%si, 1.3%st Cpu3 : 83.3%us, 3.3%sy, 0.0%ni, 12.3%id, 0.0%wa, 0.0%hi, 0.0%si, 1.0%st Cpu4 : 77.0%us, 4.3%sy, 0.0%ni, 16.3%id, 0.0%wa, 0.0%hi, 0.7%si, 1.7%st Cpu5 : 79.9%us, 5.4%sy, 0.0%ni, 13.4%id, 0.0%wa, 0.0%hi, 0.0%si, 1.3%st Cpu6 : 67.5%us, 9.9%sy, 0.0%ni, 8.6%id, 0.0%wa, 0.0%hi, 11.9%si, 2.0%st Cpu7 : 79.4%us, 4.3%sy, 0.0%ni, 14.3%id, 0.0%wa, 0.0%hi, 0.3%si, 1.7%st Mem: 16331812k total, 16138728k used, 193084k free, 29752k buffers Swap: 6342652k total, 54372k used, 6288280k free, 13397840k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 12957 root 20 0 151m 49m 768 R 83.8 0.3 2:30.36 sort 20148 apache 20 0 200m 11m 4500 S 6.3 0.1 37:23.85 php-fpm: pool www 14236 apache 20 0 204m 15m 4504 S 6.0 0.1 30:20.98 php-fpm: pool www 20152 apache 20 0 198m 9m 4504 S 6.0 0.1 37:23.14 php-fpm: pool www 20225 apache 20 0 202m 14m 4492 S 5.6 0.1 37:39.60 php-fpm: pool www 20240 apache 20 0 200m 11m 4488 S 5.6 0.1 32:22.57 php-fpm: pool www 4329 apache 20 0 200m 11m 4508 R 5.0 0.1 27:36.08 php-fpm: pool www 14244 apache 20 0 205m 17m 4524 S 5.0 0.1 30:43.39 php-fpm: pool www 14253 apache 20 0 200m 12m 5032 R 5.0 0.1 29:39.52 php-fpm: pool www 14256 apache 20 0 203m 15m 4768 S 5.0 0.1 30:33.34 php-fpm: pool www 15824 apache 20 0 199m 10m 4476 S 5.0 0.1 29:52.53 php-fpm: pool www
参考项:
1.负载
2.进程情况,是否存在大量的sleeping进程或zombie进程
3.CPU 使用情况,什么纬度占用的较多
4.SWAP和内存 查看是否存在瓶颈
二、netstat
-a 显示全部连接
-t 仅显示tcp的连接
-u 仅显示udp的连接
-n 不显示别名,以ip形式展示
-l 列出在listen的状态
-p 显示运行中的连接的名称和id号
-r 可显示路由信息
[root@cdn ~]# netstat -anptl Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 1643/redis-server 1 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 50644/nginx tcp 0 0 0.0.0.0:30000 0.0.0.0:* LISTEN 799/monit tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1346/sshd tcp 0 0 127.0.0.1:199 0.0.0.0:* LISTEN 940/snmpd tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 15023/php-fpm tcp 0 1 10.74.82.20:49088 115.182.51.13:8080 SYN_SENT 39364/wget tcp 0 1 10.74.82.20:49089 115.182.51.13:8080 SYN_SENT 39466/wget tcp 0 1 10.74.82.20:49090 115.182.51.13:8080 SYN_SENT 39391/wget tcp 0 0 10.74.82.20:22 10.74.84.118:55361 ESTABLISHED 39467/sshd tcp 0 1 10.74.82.20:49091 115.182.51.13:8080 SYN_SENT 39415/wget tcp 0 1 10.74.82.20:49092 115.182.51.13:8080 SYN_SENT 39442/wget tcp 0 0 :::22 :::* LISTEN 1346/sshd tcp 0 0 :::3306 :::* LISTEN 1564/mysqld [root@cdn ~]#
三、lsof命令
标签:sort 内存 2.3 serve command 连接 roo 使用 net
原文地址:http://www.cnblogs.com/liuquan/p/7994205.html