Xymon Mailing List Archive search

hobbitclient-sunos.sh: df bug and my fix

1 message in this thread

list T.J. Yang · Fri, 15 Jun 2007 15:21:40 -0500 ·
existing awk patten will fail to report vxfs in following df output.

root at mytest1> /bin/df -n -l
/                  : ufs
/proc              : proc
/dev/fd            : fd
/etc/mnttab        : mntfs
/var/run           : tmpfs
/tmp               : tmpfs
/export/vbs/mystore10: vxfs
/export/vbs/mystore12: vxfs
/export/vbs/mystore11: vxfs
/view              : mvfs
/export/vbs/mystore13: vxfs
/data/ccase/mystore13: lofs
/data/ccase/mystore10: lofs
root at mytest1>

Here is my modification, please confirm if this a good fix. I also exclude the mvfs(Rational clearcase file  system)

root at mytest1> diff hobbitclient-sunos.sh.orig hobbitclient-sunos.sh
25c25
< FSTYPES=`/bin/df -n -l|awk '{print $3}'|egrep -v "^proc|^fd|^mntfs|^ctfs|^devfs|^objfs|^nfs|^lofs"|sort|uniq`
---
FSTYPES=`/bin/df -n -l|awk -F':' '{print $2}'|egrep -v "^ proc|^ fd|^ mntfs|^ ctfs|^ devfs|^ objfs|^ nfs|^ lofs|^ mvfs"|sort|uniq`
root at mytest1>

T.J. Yang

Get a preview of Live Earth, the hottest event this summer - only on MSN http://liveearth.msn.com?source=msntaglineliveearthhm