- 论坛徽章:
- 0
|
如图,怎么我的内存用的这么厉害,是显示问题还是真的用了这么多?
我机器没什么服务的,就2个web
我的配置文件:
mrtg.cfg.mem
### Global Config Options
### To get bits instead of bytes and graphs growing to the right
WorkDir:/usr/local/apache/htdocs/mrtg/memory/
Language:GB2312
Refresh:300
WriteExpires:Yes
Target[localhost]: `/usr/local/apache/htdocs/mrtg/memory/mrtg.mem`
MaxBytes[localhost]: 100
Options[localhost]: gauge, growright
YLegend[localhost]: Used (%)
YSize[localhost]: 100
ShortLegend[localhost]: %
LegendI[localhost]: Used Memory
LegendO[localhost]: Used Swap
Title[localhost]: LW1 主机memory & swap负载率监控表
PageTop[localhost]: <H1>;LW1 memory & swap watch</H1>;
我的mrtg.mem:
#!/bin/bash
tmp=`sar -r 1 5 | tail -n 1`
memory=`echo $tmp | awk ' {print $4}' `
swap=`echo $tmp | awk ' {print $10}' `
UPtime=`/usr/bin/uptime | awk '{print $3 " " $4 " " $5}'`
echo $memory
echo $swap
echo $UPtime
echo LW1
麻烦大家看看 |
|