mrtg и cpuinfo.pl
Вообщем сделал всё как было указано в доке http://pm4u.narod.ru/mrtg.htm
Вот только не получается заставить выводить нагрузку проца, пишет вот что:
root@localhost / # /usr/bin/mrtg /etc/mrtg/mrtgcpu.conf
WARNING: Problem with External get '/usr/lib/mrtg2/helpers/cpuinfo.pl localhost linux':
Expected a Number for 'in' but got ''
WARNING: Problem with Externale get '/usr/lib/mrtg2/helpers/cpuinfo.pl localhost linux':
Expected a Number for 'out' but got ''
Rateup WARNING: /usr/bin/rateup could not read the primary log file for eth0
Rateup WARNING: /usr/bin/rateup The backup log file for eth0 was invalid as well
Rateup WARNING: /usr/bin/rateup Can't remove eth0.old updating log file
Rateup WARNING: /usr/bin/rateup Can't rename eth0.log to eth0.old updating log file
Rateup WARNING: /usr/bin/rateup could not read the primary log file for eth1
Rateup WARNING: /usr/bin/rateup The backup log file for eth1 was invalid as well
Rateup WARNING: /usr/bin/rateup Can't remove eth1.old updating log file
Rateup WARNING: /usr/bin/rateup Can't rename eth1.log to eth1.old updating log file
ERROR: Target[machine][_IN_] ' $target->[2]{$mode} ' did not eval into defined data
ERROR: Target[machine][_OUT_] ' $target->[2]{$mode} ' did not eval into defined data
Rateup WARNING: /usr/bin/rateup could not read the primary log file for machine
Rateup WARNING: /usr/bin/rateup The backup log file for machine was invalid as well
Rateup WARNING: /usr/bin/rateup Can't remove machine.old updating log file
Rateup WARNING: /usr/bin/rateup Can't rename machine.log to machine.old updating log file
root@localhost / # /usr/lib/mrtg2/helpers/cpuinfo.pl localhost linux
33 days, 9:43
localhost
root@localhost / # cat /etc/mrtg/mrtgcpu.conf
### Global Defaults
WorkDir: /var/www/stat/htdocs/mrtgcpu
Refresh: 300
Interval: 5
WriteExpires: Yes
IconDir: images/
LogDir: /var/log
# LogFormat: rrdtool
RunAsDaemon: No
Language: russian
Background[_]: #FFFFC0
### eth0 info
Target[eth0]: `/usr/bin/count.sh eth0`
Options[eth0]: nopercent,growright,bits
Title[eth0]: teo eth0 Traffic
PageTop[eth0]:
TIM - внутренняя сеть
MaxBytes[eth0]: 99999999
kilo[eth0]: 1024
YLegend[eth0]: bits per second
ShortLegend[eth0]: bit/s
LegendO[eth0]: out:
LegendI[eth0]: in :
### eth1 info
Target[eth1]: `/usr/bin/count.sh eth1`
Options[eth1]: nopercent,growright, bits
Title[eth1]: teo eth1 Traffic
PageTop[eth1]:
TIM - внешняя сеть
MaxBytes[eth1]: 99999999
kilo[eth1]: 1024
YLegend[eth1]: bits per second
ShortLegend[eth1]: bit/s
LegendO[eth1]: out:
LegendI[eth1]: in :
### CPU info
Target[machine]: `/usr/lib/mrtg2/helpers/cpuinfo.pl localhost linux`
MaxBytes[machine]: 100
Options[machine]: gauge, nopercent
Unscaled[machine]: dwym
YLegend[machine]: % of CPU used
ShortLegend[machine]: %
LegendO[machine]: CPU System:
Legend1[machine]: CPU User
Legend2[machine]: CPU System
Legend3[machine]: Max CPU User
Legend4[machine]: Max CPU System
LegendI[machine]: CPU User:
Title[machine]: Statistics for localhost
#PageTop[machine]:
CPU usage for localhost
System: | ;localhost |
Может ли кто-нить подкинуть рабочий cpuinfo.pl или сказать как поправить
текущий, приводить его не буду ибо очень большой. Его можно найти
по указанной ссылке.
Пы.Сы. не пинать за рута, просто у мя только он может писать в конфиги и
делать прочие неприличные вещи :)
Заранее спасибо!!!
- Для комментирования войдите или зарегистрируйтесь