[rrd-users] Re: rrdtool create question

Ashley M. Kirchner ashley at pcraft.com
Thu Oct 5 19:29:40 MEST 2006


Daniel Tepas wrote:
> rrdtool create...
>   
    Yes, but that's where I'm stuck.  All the examples I've seen are for 
creating a single DS with multiple RRAs.  Can I create it with multiple 
DSs, each one containing multiple RRAs as well (probably 2 RRAs per DS)?

> No, as far as i know you have to insert all values for the 3 values at
> once.
    Actually, that's what I meant originally.  Able to update all the 
DSs at the same time (and not run rrdtool/rrdupdate for each DS that 
needs updating.)

> hda1=`df | grep "/dev/hda1"`
> hda1p=`echo $hda1 | cut -f 5 -d " " | sed -e "s/%//g"`
>
> After this the variable hda1p contains the usage of partition
> /dev/hda1 in percent.
>   
    Just a curiosity question: why go through that instead of pulling it 
from SNMP?  (with the only difference being that SNMP will take the raw 
values of the drive while df takes the 5% super-user space into account)

> load=`w | head -1`
> loadvals=`echo $load | cut -f 11 -d " " | sed -e "s/\.//g" | sed -e
> "s/,//g"`
> if [ "$loadvals" == "" ] ; then
>         loadvals=`echo $load | cut -f 9 -d " " | sed -e "s/\.//g" |
> sed -e "s/,//g"`
> fi
> mem=`free | grep "Mem:"`
> ramtot=`echo $mem | cut -f 2  -d " "`
> ramused=`echo $mem | cut -f 3  -d " "`
> let rampercent=ramused*100/ramtot
> swap=`free | grep "Swap:"`
> swaptot=`echo $swap | cut -f 2  -d " "`
> swapused=`echo $swap | cut -f 3  -d " "`
> let swappercent=swapused*100/swaptot
>
> to get the system load, memory & swap used.
> Collect all data you need, then do:
>   
    Same here...  One can get most, if not all of those values from 
SNMP.  Is there a particular reason not to trust SNMP?

> rrdtool update /usr/local/rrdtool/system.rrd -t load:mem:swap:hda1
> N:$loadvals:$rampercent:$swappercent:$hda1p
>   
    That's what I needed to know in terms of updating.  Great.  Now i 
need to figure out how to create the rrd file.

> I tell you: use one file for one server. That's what
> I do.
    I can certainly start an rrd file for say one server, containing all 
the data I want to monitor.  However, if in the future I want to monitor 
another item, say I added another partition that needs monitoring, I'd 
prefer if it's all within the same rrd, and not end up with multiple rrd 
files for the same server.  Does that make sense?

-- 
W | It's not a bug - it's an undocumented feature.
  +--------------------------------------------------------------------
  Ashley M. Kirchner <mailto:ashley at pcraft.com>   .   303.442.6410 x130
  IT Director / SysAdmin / Websmith             .     800.441.3873 x130
  Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave. #6
  http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.


--
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