Xymon Mailing List Archive search

Question on df processing for xymonclient-linux.sh

list Henrik Størner
Tue, 04 Sep 2012 08:29:33 +0200
Message-Id: <user-eecd1b902656@xymon.invalid>

On 04-09-2012 05:02, Thomas Leavitt wrote:
Unfortunately, this has the side effect of causing DF to go from this:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              95G  2.7G   87G   3% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
udev                  2.0G  100K  2.0G   1% /dev
tmpfs                 2.0G     0  2.0G   0% /dev/shm

to this:

Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 1.9G     0  1.9G   0% /lib/init/rw
udev                  1.9G  100K  1.9G   1% /dev
tmpfs                 1.9G     0  1.9G   0% /dev/shm
rootfs                 15G  2.7G   12G  19% / <--------

which, if you look at the code, has the obvious undesirable side effect
of causing rootfs to be seen as a "nodev" filesystem, and Xymon to think
there are no filesystems to parse.

The obvious hack is to simply manually tell it to not exclude rootfs. I
do think, however, that there are more graceful and less breakage prone
ways to achieve the same end (only parsing filesystems we care about).
The problem with this approach is that "filesystems we care about" 
changes regularly, whenever some clever kernel hacker comes up with a 
new filesystem.

So the obvious hack for this is attached. Note that simply not excluding 
"rootfs" won't work, since "rootfs" is not seen by Xymon as a device 
name which breaks the graph handling code ... So this patch has the 
added bonus of actually providing you with the correct devicename for 
your root filesystem.

Regards,
Henrik
Attachments (1)