[Xymon] mounted NFS volumes not included in disk utilization graphs
Jeremy Laidman
jlaidman at rebel-it.com.au
Wed Apr 1 02:52:35 CEST 2015
On 1 April 2015 at 06:46, Paul Grondahl <paul at arrowtel.net> wrote:
> Using CentOS 6.4
>
> The last line in the df output shows the NFS mount.
>
> [df]
> Filesystem 1024-blocks Used Available Capacity Mounted on
> /dev/vda2 19766140 6449876 12312184 35% /
> /dev/vda1 99150 25418 68612 28% /boot
>
> It's the [df] section of the client data that is used to record disk
usage, not the [mount] section. For the Linux client script
(xymonclient-linux.sh) the command is "df -Pl" where the "-l" means "local
file systems".
The script also looks for "nodev" devices and builds an exclude list of
filesystem times to remove from the output of "df". This is intended to
remove pseudo filesystems such as proc and tmpfs, but also removes
NFS-mounted filesystems.
There are various manipulations that you need to make in order for the "df"
command to show the extra filesystems you want. But in my opinion, the
easiest way to accomplish this is to simply add an extra "df" command into
the [df] part of the script, showing the extra filesystems you want. Such
as:
echo "[df]"
EXCLUDES=`cat /proc/filesystems | grep nodev | awk '{print $2}' | xargs
echo | sed -e 's! ! -x !g'`
{ df -Pl -x iso9660 -x $EXCLUDES; df -P -t nfs | tail +2; } | sed -e '/^[^
][^ ]*$/{
N
s/[ ]*\n[ ]*/ /
}'
The bit I added was "df -P -t nfs | tail +2" (along with the {braces} to
make it look to awk like a single df command). Give this a go and let me
know if it works for you.
HTH
Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150401/e481edcc/attachment.html>
More information about the Xymon
mailing list