This is a discussion on [rrd-users] CPU usage RRD-DS Please help within the RRD Users forums, part of the Networking and Network Related category; Hi all. I want to display CPU usage graph(perl script+rrdtool) 1. 6h 2. 1day 3.1week. 4. 1 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all.
I want to display CPU usage graph(perl script+rrdtool) 1. 6h 2. 1day 3.1week. 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", "N:$usr:$nice:$sys:$idle"; So please help me to design the correct rrd . what DS I should used COUNTER or GAUGE? I want to update the database every 1 minute using etc/crontab. Thanks in advance. with regards suhas -- Unsubscribe mailto:rrd-users-request@list.ee.ethz.ch?subject=unsubscribe Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help Archive http://lists.ee.ethz.ch/rrd-users WebAdmin http://lists.ee.ethz.ch/lsg2.cgi |