|
|
[root@localhost cpu]# pwd
/var/www/html/website1/mrtg/cpu
[root@localhost cpu]# more mrtg.cpu
#!/bin/bash
cpuusr=`/usr/bin/sar -u 1 3 | grep Average | awk '{print $3}'`
cpusys=`/usr/bin/sar -u 1 3 | grep Average | awk '{print $5}'`
UPtime=`/usr/bin/uptime | awk '{print $3 " " $4 " " $5}'`
echo $cpuusr
echo $cpusys
echo $UPtime
echo localhost
[root@localhost cpu]# ./mrtg.cpu
1.33
2.33
17 min, 1
localhost
[root@localhost cpu]# more mrtg.cfg.cpu
WorkDir: /var/www/html/website1/mrtg/cpu/
Language: GB2312
Target[localhost]: '/var/www/html/website1/mrtg/cpu/mrtg.cpu'
MaxBytes[localhost]: 100
Options[localhost]: gauge,nopercent,growright
YLegend[localhost]: CPU Loading(%)
ShortLegend[localhost]: %
LegendO[localhost]: CPU User;
LegendI[localhost]: CPU System;
Title[localhost]: 99_CPU
PageTop[localhost]: 99_CPU
[root@localhost cpu]# mrtg /var/www/html/website1/mrtg/cpu/cpu.cfg
ERROR: Target[cpu][_IN_] 'ssCpuRawUser.0&ssCpuRawIdle.0: public@10.10.119.2' (warn): (Missing operator before ?)
ERROR: Target[cpu][_OUT_] 'ssCpuRawUser.0&ssCpuRawIdle.0: public@10.10.119.2' (warn): (Missing operator before ?)
WARNING: Skipping Update of cpu, inlast is not defined
WARNING: Skipping Update of cpu, outlast is not defined
[root@localhost cpu]#
不管执行多少遍都是这样的错误呀!
高手指教一下
谢谢!~~~~~~ |
|