CentOS 7
Sponsored Link

MRTG : Get CPU Load Average2015/06/16

Configure MRTG to display CPU Load Average rate.
[1] Configure MRTG.
[root@dlp ~]#
vi /etc/mrtg/mrtg.cfg
# add follows to the end (replace the "Serverworld" to your comunity name)

Target[CPU]: .
MaxBytes[CPU]: 100
Unscaled[CPU]: dwmy
Options[CPU]: gauge, growright, nopercent
YLegend[CPU]: Load Average
ShortLegend[CPU]: (%)
LegendI[CPU]: Load Average 1 min
LegendO[CPU]: Load Average 5 min
Legend1[CPU]: Load Average 1 min
Legend2[CPU]: Load Average 5 min
Title[CPU]: CPU Load Average
PageTop[CPU]: <h1>CPU Load Average</h1>

# execute mrtg 3 times (display warnings until 3 times)

[root@dlp ~]#
for (( i=1 ; i <= 3 ; i++ )); do env LANG=C mrtg /etc/mrtg/mrtg.cfg; done

2015-06-16 19:20:01, Rateup WARNING: /usr/bin/rateup could not read the primary log file for cpu
2015-06-16 19:20:01, Rateup WARNING: /usr/bin/rateup The backup log file for cpu was invalid as well
2015-06-16 19:20:01, Rateup WARNING: /usr/bin/rateup Can't rename cpu.log to cpu.old updating log file
# generate index file

[root@dlp ~]#
indexmaker --columns=1 /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html
[2] Access to the "http://(MRTG hostname or IP address)/mrtg/" from a client with HTTP, then it's possible to see CPU load average rate.
Matched Content