[rrd-users] CPU usage RRD-DS Please help

Mr. Suhas Ghosh suhas786 at gmail.com
Fri Oct 13 03:05:38 MEST 2006

Hi all.
    I want to display CPU usage graph(perl script+rrdtool)
    1. 6h
    2. 1day
    4. 1 month
    5. 1 year.
    I want to collect data from /proc/stat.
    I am using these command
my $usr = `cat /proc/stat | grep "cpu" --max-count=1 |cut -d" " -f3|cut -d"
" -f2 |sed 's/ //g'`;
my $nice = `cat /proc/stat | grep "cpu" --max-count=1 |cut -d" " -f4|cut -d"
" -f3 |sed 's/ //g'`;
my $sys = `cat /proc/stat | grep "cpu" --max-count=1 |cut -d" " -f5|cut -d"
" -f4|sed 's/ //g'`;
my $idle = `cat /proc/stat | grep "cpu" --max-count=1 |cut -d" " -f6|cut -d"
" -f5|sed 's/ //g'`;
and update command is as follows
RRDs::update "$rrd/cpu.rrd",
        "-t", "cpuusr:cpunic:cpusys:cpuidl",
So please help me to design the correct rrd . what DS I should used COUNTER
I want to update the database every 1 minute using etc/crontab.
Thanks in advance.
with regards


Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the rrd-users mailing list