Hi Ashwin,

> Can u pls give us more info on MRTG and where can i find it

MRTG is a graphing program that runs scripts every 5 mins to record data and 
graph this data in daily, weekly, monthly and yearly charts.

You can download MRTG from http://www.mrtg.org

My CPU script is:
#!/bin/bash

# Get avg CPU usage
LINE=`sar -u 1 5 | grep Average`
set $LINE

# print user%
echo $3

# print system%
echo $5

# print uptime
uptime | sed 's/.* up \([^,]*\), .*$/\1/'

# print machine name
uname -a | cut -d " " -f 2


My MRTG config for CPU graph is:
Target[cpu]: `/root/scripts/mrtg/cpu`
MaxBytes[cpu]: 100
Title[cpu]: CPU Usage %
PageTop[cpu]: <H1>CPU Statistics</H1>
Options[cpu]: growright, gauge, nopercent, noarrow, nobanner
Suppress[cpu]: y
YLegend[cpu]: CPU Usage %
ShortLegend[cpu]: %
Legend1[cpu]: User CPU %
Legend2[cpu]: System CPU %
LegendI[cpu]: &nbsp;User:&nbsp;
LegendO[cpu]: &nbsp;System:&nbsp;


Hope this helps

-- 
Regards,
+-----------------------+---------------------------------+
| Peter Kiem            | E-Mail    : <[EMAIL PROTECTED]> |
| Zordah IT             | Mobile    : +61 0414 724 766    |
|   IT Consultancy &    | WWW       : www.zordah.net      |
|   Internet Hosting    | ICQ       : "Zordah" 866661     |
+-----------------------+---------------------------------+





_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to