(This is a resend, so my apologies if it duplicates get posted to the
list. My previous attempts with the patch file attached failed.)
Charles Jones wrote:
I second that request. By default the larrd memory graphs for linux
hosts are all but useless since it graphs the "Physical" value which
is always near 100% due to the output of the linux free command that
reflects the memory buffers/caching.
I think I have it working now, at least for the all of the Linux clients
I'm running. The only edits I made were to the memory-larrd.sh
script--I'm running larrd-graphs.cgi v1.5 (from deadcat.net) and it
automagically took care of everything else. I added a section to graph
the "Actual" data along side the real/swap, plus I took the liberty of
changing the word "real" to "physical" so the plots use the same names
as the output from bb-memory.sh: Physical, Actual & Swap.
Patch file is below. Should be as simple as grabbing
larrd-graphs-1.5.tar.gz from deadcat.net and installing it, then
cd LARRDHOME
patch memory-larrd.sh <memory-larrd.sh.patch
Hope that helps. Good luck.
Tom
--- memory-larrd.sh.orig 2004-10-27 08:30:47.000000000 -0400
+++ memory-larrd.sh 2004-10-27 09:14:20.000000000 -0400
@@ -85,7 +85,10 @@
# pearcec added this line to match how larrd likes the rrds
11/9/2000
# I need to fix this
#HOST=`echo $HOST | $SED 's/,/\.//'`
- RRD=$BBRRDS/$HOST.memory.real.rrd
+ # Changed RRD filename contents from "real" to "physical"
+ # so the plot name on the graph matches bb-memory.sh
+ # output. Tom Georgoulias 10/27/04
+ RRD=$BBRRDS/$HOST.memory.physical.rrd
# if it doesn't exist, make it
if [ ! -f $RRD ]
@@ -161,6 +164,52 @@
fi
$RRDTOOL update $RRD $TS:$VALUE
+# add support to graph "Actual" memory as well.
+# I just copied the section above for swap and edited the filename
+# for RRD, plus the HEAD line to grab the actual values.
+# Since I'm using larrd-graphs.cgi v1.5 from deadcat.net, I didn't
+# need to make any edits to that script.
+# Tom Georgoulias 10/27/04
+RRD=$BBRRDS/$HOST.memory.actual.rrd
+
+
+ # if it doesn't exist, make it
+ if [ ! -f $RRD ]
+ then
+ # $RRAS is defined in larrd.conf
+ $RRDTOOL create $RRD DS:realmempct:GAUGE:600:0:U $RRAS
+
+
+ if [ $STATUS -eq 1 ]
+ then
+ echo "$0: STATUS did not find $RRD, created."
+ fi
+ fi
+
+ # RRD acquisition co>plete, proceed to TS
+
+ # i am lazy right now and just using current -gra
+ # getting epoch from a file -grapht>p is a pain
+ # so the -grapht>p is from when the data is gathered
+ # not when it actually happened, ugh
+ TS=N
+ # TS=acquisition complete, proceed to VALUE
+
+ # now lets get the data
+ # look through the file and get what you want
+ # e.g. load average
+ VALUE=`$HEAD -4 $log | $EGREP 'Actual' |$AWK '{print $5}'
|$SED 's/%//g'`
+ #VALUE=`$HEAD -4 $log | $GREP Swap |$AWK '{print $5}' |$SED
's/%//g'`
+ # VALUEoacquired, do the job
+
+ if [ $DEBUG -eq 1 ]
+ then
+ echo "$0: DEBUG $RRDTOOL update $RRD $TS:$VALUE"
+ fi
+ $RRDTOOL update $RRD $TS:$VALUE
+
+
+
done
# NT logs the memory usage in .cpu
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.