[rrd-users] recreating XSysStats with rrd?
Ciaran.Deignan at bull.net
Ciaran.Deignan at bull.net
Mon Jan 24 17:03:38 MET 2000
Hi,
I started out just wanting to be able to print the display of "xsysstat",
now it looks like I'm redoing it ;-)
xsysstats uses the system call "rstats( host, struct * stats)", and then
draws a real-time graph. I don't want a real-time graph, but I do want to
keep the samples for a longer time and do more analysis on it.
I'm half-way there, and I'm only just wondering if anyone has already done
this? My experimental program to copy from rstats() to rdd-tool is in
attachement. I can run this command from cron, every minute if I want, and
it will dump the numbers to rdd-tool.
I was thinking of creating an rrt database as follows:
# 1 sample every 60 seconds
# keep each data point for 1 day = 24 hours * 60 minutes = 1440, say 1500
# keep hourly average for 1 month = 30 days * 24 hours = 720, say 800
# (1 hour = 60 minutes)
# keep 6-hour average, min and max for a year = 366 days * 4 6-hours = 1480
# (6 hours = 6*60 minutes = 360)
rrdtool create localhost.rrd \
--step 60 \
DS:user:COUNTER:600:U:U \
DS:sys:COUNTER:600:U:U \
DS:wait:COUNTER:600:U:U \
DS:idle:COUNTER:600:U:U \
DS:opackets:COUNTER:600:U:U \
DS:ipackets:COUNTER:600:U:U \
DS:obytes:COUNTER:600:U:U \
DS:ibytes:COUNTER:600:U:U \
DS:pgpgin:COUNTER:600:U:U \
DS:pgpgout:COUNTER:600:U:U \
DS:pswpin:COUNTER:600:U:U \
DS:pswpout:COUNTER:600:U:U \
DS:intr:COUNTER:600:U:U \
DS:disk1:COUNTER:600:U:U \
DS:disk2:COUNTER:600:U:U \
DS:disk3:COUNTER:600:U:U \
DS:disk4:COUNTER:600:U:U \
RRA:AVERAGE:0.5:1:1500 \
RRA:AVERAGE:0.5:60:800 \
RRA:AVERAGE:0.5:360:1500 \
RRA:MIN:0.5:360:1500 \
RRA:MAX:0.5:360:1500
This is my first serious attempt at creating a database structure,
has anyone any suggestions/optimisations?
Has anyone got any good ideas on how to present the information?
The CPU info is fairly easy (pity rstats() doesn't give "wait" info),
for example
rrdtool graph localhost_avg.gif \
"DEF:user=$host.rrd:user:AVERAGE" \
"DEF:sys=$host.rrd:sys:AVERAGE" \
"DEF:idle=$host.rrd:idle:AVERAGE" \
"AREA:user#ff0000:user" \
"STACK:sys#00FF00:sys" \
"STACK:idle#0000FF:idle"
and
cmd rrdtool graph localhost_extreem.gif \
"DEF:user=$host.rrd:user:MAX" \
"DEF:sys=$host.rrd:sys:MAX" \
"DEF:idle=$host.rrd:idle:MIN" \
"LINE3:user#ff0000:Max User" \
"STACK:sys#00FF00:Max Sys" \
"LINE1:idle#0000FF:Min Idle" \
Equally, has anyone interfaced rrd with SAR for addiotional information on
the current host?
Thanks,
Ciaran
+-------------------------------------------------------------------------+
Ciaran Deignan Tel: (France) 04 76 29 79 92
BULL XS-BU (http://www-frec.bull.com) HA and Consolidation
Mail to: Ciaran.Deignan at bull.net Bullcom: 229 79 92
PGP: B1 78 FB 88 FD 86 58 A8 89 7B 22 8C D0 E8 71 FC Fax: 229 75 18
+-------------------------------------------------------------------------+
-- Attached file removed by Listar and put at URL below --
-- Type: TEXT/PLAIN
-- Size: 5k (5285 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/getstats.c
--
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://www.ee.ethz.ch/~slist/rrd-users
More information about the rrd-users
mailing list