[Xymon] disk space check for cifs mounted folders with spaces

Andrey Chervonets a.chervonets at cominder.eu
Wed Aug 15 00:41:21 CEST 2012


For now I've found workaround like:

adjust : client/bin/xymonclient-linux.sh
## OLD:
df -P -x iso9660 -x $EXCLUDES | sed -e '/^[^     ][^     ]*$/{
N
s/[     ]*\n[   ]*/ /
}'

## NEW:

df -P | head -1 > /tmp/df
df -P -x iso9660 -x $EXCLUDES | awk -F" " '{print $(NF-5)" "$(NF-4)" 
"$(NF-3)" "$(NF-2)" "$(NF-1)" "$(NF)}' | grep -v "Used" >>/tmp/df
## orig: df -P -x iso9660 -x $EXCLUDES
cat /tmp/df  | sed -e '/^[^     ][^     ]*$/{
N
s/[     ]*\n[   ]*/ /
}'

##

As result resource will be reported like:

Data$     996144124 307215728 688928396      31% /mnt/utl/utmas

Not very nice, but working. Any new ideas, improvements are welcome.



Best regards,

Andrey Chervonets
----------------------
CoMinder Ltd.
http://www.cominder.eu/




On 14.08.2012 13:00, xymon-request at xymon.com wrote:
> From: Andrey Chervonets<a.chervonets at cominder.eu>
> To:xymon at xymon.com
> Subject: [Xymon] disk space check for cifs mounted folders with spaces
> 	in	name
> Message-ID:<50297935.8000700 at cominder.eu>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> I've got problem with detecting free space for NTFS folder mounted with
> cifs that contains spaces in it's name:
>
>
> 688928396      31% /mnt/utl/utmas (307215728% used) has reached the
> PANIC level (95%)
>
> Filesystem         1024-blocks      Used Available Capacity Mounted on
> ....
> //10.10.10.21/abc_itity$            996144124 307215728 688928396
> 31% /mnt/utl
> //10.10.10.21/ABC-RUS ATT Data$     996144124 307215728 688928396
> 31% /mnt/utl/utmas
>
>
>
> In our case - we have 2 resources mounted from the same source disk in
> NTFS - one with regular name,
> other contains spaces. Only the second one is reported as using
> *307215728% used!!*
>
> Xymon Server 4.3.4, centralised mode.
>
>
> Any ideas to overcome this problem?
>
>
>




More information about the Xymon mailing list