Xymon Mailing List Archive search

disk space check for cifs mounted folders with spaces

1 message in this thread

list Andrey Chervonets · Wed, 15 Aug 2012 01:41:21 +0300 ·
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<user-e7fb5c02322c@xymon.invalid>
To:xymon at xymon.com
Subject: [Xymon] disk space check for cifs mounted folders with spaces
	in	name
Message-ID:<user-01ea3f13133f@xymon.invalid>
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?