Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6076294
  • 博文数量: 2759
  • 博客积分: 1021
  • 博客等级: 中士
  • 技术积分: 4091
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-11 14:14
文章分类

全部博文(2759)

文章存档

2019年(1)

2017年(84)

2016年(196)

2015年(204)

2014年(636)

2013年(1176)

2012年(463)

分类: LINUX

2015-12-09 07:17:03

原文地址:Linux Performance Monitoring 作者:edgeman03

好書: Linux Performance Monitoring 下載 (電子書)

Linux 效能調校 與 監控、監看, 該如何做、如何看?

此書有介紹 下述命令該如何觀看.
vmstat
mpstat
sar
iostat
netstat
dstat
iptraf
netperf
ethtool
iperf
tcptrace

詳細可見:
文件:Linux_Performance_Monitoring.chm
大小:259KB
下载:下载 

ps 透過 psr 可以看到 Process 佔用哪個 CPU
while :; do ps -eo pid,ni,pri,pcpu,psr,comm | grep 'apache'; sleep 1; done # 看 Aaache
while :; do ps -eo pid,ni,pri,pcpu,psr,comm | grep 'mysql'; sleep 1; done # 看 MySQL
寫入 Bash alias
vim .bashrc # 加入下述
alias apachemon='while :; do ps -eo pid,ni,pri,pcpu,psr,comm | grep "apache"; sleep 1; done';
alias mysqlmon='while :; do ps -eo pid,ni,pri,pcpu,psr,comm | grep "mysql"; sleep 1; done';
使用 apachemon, mysqlmon 即可看 Process 對 CPU 的 使用狀況.
阅读(1235) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~