[hobbit] Missing partition in disk monitoring on Solaris 10
Dominique Frise
dominique.frise at unil.ch
Wed May 27 08:09:56 CEST 2009
Benoit Schmid wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dominique Frise wrote:
>> From hobbitclient-sunos.sh you can see that Xymon uses following
>> commands to report disk usage
>> ...
>> echo "[df]"
>> ROOTFSTYPE=`/bin/df -n / | awk '{print $3}'`
>> /bin/df -F $ROOTFSTYPE -k
>> # Then see what fs types are in use, and weed out those we dont want.
>> FSTYPES=`/bin/df -n -l|cut -d: -f2 | awk '{print $1}'|egrep -v
>> "^${ROOTFSTYPE}|^proc|^fd|^mntfs|^ctfs|^devfs|^objfs|^nfs|^lofs|^sharefs"|sort|uniq`
>>
>> set $FSTYPES
>> while test "$1" != ""; do
>> /bin/df -F $1 -k | egrep -v " /var/run" | tail +2
>> shift
>> done
>> ...
>>
>> This means that /var/run, /dev/fd, /system/object, /etc/mnttab,
>> /system/contract, /proc and /dev mounts are excluded from the output.
>> /var and /common seem to be lofs mounts and will be excluded as well.
>>
>
> On your solaris zones how do you monitor your filesysteme.
> The problem that I have with df on the global zone is that hobbit
> does not have read access to this var partition.
> Therefore it is not monitored to on the global zone.
>
> How do you proceed to monitor your disk spaces on your solaris zones?
> I am thinking of patching this script.
> Is there a better solution?
>
We use the sparse-root model for all of our Solaris servers running
zones and do not have any issue like this.
Example from a server running 6 zones besides the global:
$ df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 91499930 10685571 79899360 12% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 49238864 1440 49237424 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
91499930 10685571 79899360 12%
/platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
91499930 10685571 79899360 12%
/platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0 0 0 0% /dev/fd
swap 4194304 32 4194272 1% /tmp
swap 49237512 88 49237424 1% /var/run
poolcpasd/root 30707712 2767296 20456153 12% /zones/arescpasd
poolcpasp/root 30707712 2770120 20548811 12% /zones/arescpasp
poolcpast/root 30707712 2770576 20547973 12% /zones/arescpast
pooldev/root 108380160 911553 69755353 2% /zones/aresdev
poolprd/root 146571264 819624 69509723 2% /zones/aresprd
pooltst/root 146571264 815058 75230859 2% /zones/arestst
Xymon displays:
Wed May 27 08:00:20 CEST 2009 - Filesystems OK
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 91499930 10685575 79899356 12% /
swap 4194304 32 4194272 1% /tmp
poolcpasd/root 30707712 2767296 20456153 12% /zones/arescpasd
poolcpasp/root 30707712 2770120 20548809 12% /zones/arescpasp
poolcpast/root 30707712 2770576 20547972 12% /zones/arescpast
pooldev/root 108380160 911553 69755350 2% /zones/aresdev
poolprd/root 146571264 819624 69509720 2% /zones/aresprd
pooltst/root 146571264 815058 75230854 2% /zones/arestst
Dominique
More information about the Xymon
mailing list