[mrtg] Oddities
Ashley M. Kirchner
ashley at pcraft.com
Tue Mar 28 10:02:53 MEST 2000
MRTG version 2.8.12
Consider the following script
[ some lines wrapped for legibility]:
#!/usr/bin/ksh
# Script to extract the "per cent full" number for the two
# file-systems named on the command line.
#
first=`df ${1} | tail -n 1 | sed 's/\ \ */ /g' | cut -d\ -f 5 | \
sed 's/%//'`
second=`df ${2} | tail -n 1 | sed 's/\ \ */ /g' | cut -d\ -f 5 | \
sed 's/%//'`
echo ${first}
echo ${second}
echo "quite a while"
echo `uname -n`
...and the following config file
[ some lines wrapped for legibility ]:
########
# Disk Usage
WorkDir: /usr/local/mrtg
Directory[disk.mailpc]: disk/mail.pcraft
Target[disk.mailpc]: `/usr/local/mrtg/disk/disk.mailpc/disk.sh \
/dev/hda6 /dev/hdb1`
MaxBytes[disk.mailpc]: 100
Unscaled[disk.mailpc]: dwmy
Options[disk.mailpc]: gauge
Title[disk.mailpc]: NS1.PC Disk Usage
PageTop[disk.mailpc]: <H1>NS1 Disk Usage</H1>
XSize[disk.mailpc]: 360
YSize[disk.mailpc]: 75
WithPeak[disk.mailpc]: dwmy
YLegend[disk.mailpc]: % full
ShortLegend[disk.mailpc]: % full
LegendI[disk.mailpc]: /home
LegendO[disk.mailpc]: /var/log
Legend1[disk.mailpc]: /home directory
Legend2[disk.mailpc]: /var/log directory
Why does the resulting page have all four legends at the bottom, as
defined in the mrtg perl script (green, blue, dark green and magenta),
and why does the weekly and yearly graph all have 4 colors in them?
Daily and weekly seems to be working fine. I get the legends correctly
under each graph, except at the bottom of the page, where the first two
(Legend1 and Legend2) show up fine, but then Legend3 and Legend4 are the
same as what's hard coded into the mrtg perl script.
The same is happening on a different config as well, and something
different is happening on yet another one, where it's listing Legend1
and Legend3, and completely ignores Legend2 and Legend4, which are both
defined as well.
I even tried breaking these into separate config scripts, see maybe
one was messing with the other, but no such luck.
AMK4
--
H | Hi, I'm currently out of my mind. Please leave a message. BEEEEP!
|____________________________________________________________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ashley M. Kirchner <mailto:ashley at pcraft.com> . 303.442.6410 x130
Director of Internet Operations / SysAdmin . 800.441.3873 x130
Photo Craft Laboratories, Inc. . eFax 248.671.0909
http://www.pcraft.com . 3550 Arapahoe Ave
.................. . . . . Boulder, CO 80303
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
More information about the mrtg
mailing list