[Xymon] Question on df processing for xymonclient-linux.sh

Thomas Leavitt thomleavitt at gmail.com
Tue Sep 4 05:02:01 CEST 2012


I've recently run up against this problem... after doing a virtual machine
migration using the P2V functionality of VMware Converter 5.0, which leaves
you with an unbootable VM due to the fact that the kernel binaries used in
the converter server VM are five years old, and thus incompatible with
current kernels and their dependencies, I used the excellent "Boot Repair"
utility to repair grub and restore my converted VMs to functionality.

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:



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). I'm not a
major coder, so I don't really have any suggestions for a patch, but I
would start out by affirmatively including filesystems, rather than relying
on an exclusion list, and basing the inclusion list on /etc/fstab

Thomas

On Thu, Apr 12, 2012 at 8:37 PM, Jeremy Laidman <jlaidman at rebel-it.com.au>wrote:

> On Fri, Apr 13, 2012 at 12:11 AM, Deiss, Mark <Mark.Deiss at acs-inc.com>wrote:
>
>> A bit concerned that the df line can have a dangling "-x" option if the
>> EXCLUDES variable is not populated.
>
>
> Perhaps just wrap the variable in quotes like so:
>
>   df -Pl -x iso9660 -x "$EXCLUDES" | sed -e
>
> Then "df" doesn't throw an error.
>
> J
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120903/ec9ff25b/attachment.html>


More information about the Xymon mailing list