我监视我的服务器上的磁盘,因为我的网站很慢。
这是我的磁盘统计:
阅读:0.29请求/秒写:50.19请求/秒
我不明白为什么我的文件在磁盘上第二次有50个请求。
我怎样才能find像猪一样写的程序? 命令行 ? 程序?
更新 :服务器是一个debian蚀刻。 磁盘在SAN中,所以它是一个虚拟磁盘。
我的数据库是一个MySQL和我的网站在轨道上的ruby。
我有1 GB的RAM。
这是free命令的结果:
free -m total used free shared buffers cached Mem: 995 769 225 0 46 421 -/+ buffers/cache: 301 693 Swap: 1906 0 1906
我不认为是交换问题。 我不明白:(
好吧,经过多次search,我发现:
Postfix在我的系统日志文件中添加了10个条目:秒,日志是这样的:
Feb 16 10:51:41 myhost postfix/local[24480]: 333902F1CE: to=<[email protected]>, orig_to=<root>, relay=local, delay=73, delays=42/25/0/6.1, dsn=5.1.1, status=bounced (unknown user: "ovh") Feb 16 10:51:41 myhost postfix/qmgr[3753]: 528032F1D3: removed Feb 16 10:51:41 myhost postfix/cleanup[24624]: CEBAD2F1D4: message-id=<[email protected]> Feb 16 10:51:41 myhost postfix/bounce[24575]: B8EE32F19B: sender non-delivery notification: DDE2D2F1DE Feb 16 10:51:41 myhost postfix/qmgr[3753]: DDE2D2F1DE: from=<>, size=2798, nrcpt=1 (queue active) Feb 16 10:51:41 myhost postfix/cleanup[25934]: 659B02F1D3: message-id=<[email protected]> Feb 16 10:51:41 myhost postfix/qmgr[3753]: B8EE32F19B: removed Feb 16 10:51:41 myhost postfix/local[24948]: DDE2D2F1DE: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=15, delays=12/2/0/1.3, dsn=5.1.1, status=bounced (unknown user: "ovh") Feb 16 10:51:41 myhost postfix/bounce[24726]: 333902F1CE: sender non-delivery notification: 659B02F1D3 Feb 16 10:51:41 myhost postfix/qmgr[3753]: CEBAD2F1D4: from=<[email protected]>, size=983, nrcpt=1 (queue active) Feb 16 10:51:41 myhost postfix/qmgr[3753]: 333902F1CE: removed Feb 16 10:51:41 myhost postfix/qmgr[3753]: 659B02F1D3: from=<>, size=2792, nrcpt=1 (queue active) Feb 16 10:51:41 myhost postfix/qmgr[3753]: DDE2D2F1DE: removed Feb 16 10:51:47 myhost postfix/local[24480]: 659B02F1D3: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=8.7, delays=3.3/0/0/5.4, dsn=5.1.1, status=bounced (unknown user: "ovh") Feb 16 10:51:47 myhost postfix/local[25978]: CEBAD2F1D4: to=<[email protected]>, orig_to=<root>, relay=local, delay=32, delays=27/0/0/5.4, dsn=5.1.1, status=bounced (unknown user: "ovh") Feb 16 10:51:47 myhost postfix/qmgr[3753]: 659B02F1D3: removed Feb 16 10:51:47 myhost postfix/cleanup[24906]: 1A7512F19B: message-id=<[email protected]> Feb 16 10:51:53 myhost postfix/bounce[24726]: CEBAD2F1D4: sender non-delivery notification: 1A7512F19B Feb 16 10:51:53 myhost postfix/qmgr[3753]: CEBAD2F1D4: removed Feb 16 10:51:53 myhost postfix/qmgr[3753]: 1A7512F19B: from=<>, size=2798, nrcpt=1 (queue active) Feb 16 10:51:59 myhost postfix/local[24948]: 1A7512F19B: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=12, delays=6.2/0/0/6.1, dsn=5.1.1, status=bounced (unknown user: "ovh") Feb 16 10:51:59 myhost postfix/qmgr[3753]: 1A7512F19B: removed Feb 16 10:52:11 myhost /USR/SBIN/CRON[25984]: (root) CMD (/usr/local/rtm/bin/rtm 18 > /dev/null 2> /dev/null) Feb 16 10:52:11 myhost /USR/SBIN/CRON[25985]: (root) CMD (wget -O /dev/null http://monsite.com/cron/desactive_arene) Feb 16 10:52:16 myhost /USR/SBIN/CRON[25987]: (root) CMD (run-parts /usr/local/oco/bin/60sec >/dev/null 2>/dev/null) Feb 16 10:52:22 myhost /USR/SBIN/CRON[25988]: (root) CMD (run-parts /usr/local/oco/bin/120sec >/dev/null 2>/dev/null) Feb 16 10:52:39 myhost postfix/pickup[23034]: 8A8CC2F1BD: uid=0 from=<root> Feb 16 10:52:44 myhost postfix/cleanup[24624]: 8A8CC2F1BD: message-id=<[email protected]> Feb 16 10:52:44 myhost postfix/qmgr[3753]: 8A8CC2F1BD: from=<[email protected]>, size=983, nrcpt=1 (queue active) Feb 16 10:52:44 myhost postfix/local[24480]: 8A8CC2F1BD: to=<[email protected]>, orig_to=<root>, relay=local, delay=21, delays=15/0/0/6.1, dsn=5.1.1, status=bounced (unknown user: "ovh")
在这里,我不明白发生了什么事。
除了上面提到的iotop之外,你还没有在某处启用LOG_ALL,是吗?
其他可能有用的提示:
如果是最近的linux系统,iotop是你想运行的程序。