Xymon Mailing List Archive search

Missing partition in disk monitoring on Solaris 10

5 messages in this thread

list Benoit Schmid · Tue, 26 May 2009 15:51:24 +0200 ·
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On a server running solaris 10, df gives:

# df -k
Filesystem             size   used  avail capacity  Mounted on
/                        0K   6.7G    38G    15%    /
/common                123G   1.6M   123G     1%    /common
/dev                    45G   6.7G    38G    15%    /dev
/var                   8.9G   1.8G   7.2G    20%    /var
proc                     0K     0K     0K     0%    /proc
ctfs                     0K     0K     0K     0%    /system/contract
mnttab                   0K     0K     0K     0%    /etc/mnttab
objfs                    0K     0K     0K     0%    /system/object
swap                    17G   328K    17G     1%    /etc/svc/volatile
fd                       0K     0K     0K     0%    /dev/fd
swap                    17G    32K    17G     1%    /tmp
swap                    17G    32K    17G     1%    /var/run

Unfortunately hobbit just shows:
Filesystem            kbytes    used   avail capacity  Mounted on
swap                 17718392     328 17718064     1%
/etc/svc/volatile
swap                 17718088      32 17718056     1%    /tmp
/                          0 7029995 39920877    15%    /

Would you know why not all partitions are monitored?

If no, could you please provide me a hint on how to diagnose this
problem?

Thanks in advance for your answer.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkob89wACgkQPzupdm8BofyE3QCgkt7elQfIS9GKRIc9cWBJKwXP
JKcAnjlUI+OdAuhE5lTFSUSke7ZmhvxU
=ytg5
-----END PGP SIGNATURE-----
list Dominique Frise · Tue, 26 May 2009 16:24:05 +0200 ·
quoted from Benoit Schmid
Benoit Schmid wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On a server running solaris 10, df gives:

# df -k
Filesystem             size   used  avail capacity  Mounted on
/                        0K   6.7G    38G    15%    /
/common                123G   1.6M   123G     1%    /common
/dev                    45G   6.7G    38G    15%    /dev
/var                   8.9G   1.8G   7.2G    20%    /var
proc                     0K     0K     0K     0%    /proc
ctfs                     0K     0K     0K     0%    /system/contract
mnttab                   0K     0K     0K     0%    /etc/mnttab
objfs                    0K     0K     0K     0%    /system/object
swap                    17G   328K    17G     1%    /etc/svc/volatile
fd                       0K     0K     0K     0%    /dev/fd
swap                    17G    32K    17G     1%    /tmp
swap                    17G    32K    17G     1%    /var/run
What your are showing us is not the output of df -k but rather df -h.
quoted from Benoit Schmid
Unfortunately hobbit just shows:
Filesystem            kbytes    used   avail capacity  Mounted on
swap                 17718392     328 17718064     1%
/etc/svc/volatile
swap                 17718088      32 17718056     1%    /tmp
/                          0 7029995 39920877    15%    /

Would you know why not all partitions are monitored?
 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.


Dominique
list Great D Dilla · Wed, 27 May 2009 05:02:58 +0800 ·
Shouldn't the first column be in the /dev/dsk/cwtxdysz format or an
equivalent thereof (volume manager mount points)?

The output of "df" seems weird. That is probably why xymon did not display
them.

Regards.
quoted from Benoit Schmid

-----Original Message-----
From: Benoit Schmid [mailto:user-eb70faf94883@xymon.invalid] 
Sent: Tuesday, May 26, 2009 9:51 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Missing partition in disk monitoring on Solaris 10

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On a server running solaris 10, df gives:

# df -k
Filesystem             size   used  avail capacity  Mounted on
/                        0K   6.7G    38G    15%    /
/common                123G   1.6M   123G     1%    /common
/dev                    45G   6.7G    38G    15%    /dev
/var                   8.9G   1.8G   7.2G    20%    /var
proc                     0K     0K     0K     0%    /proc
ctfs                     0K     0K     0K     0%    /system/contract
mnttab                   0K     0K     0K     0%    /etc/mnttab
objfs                    0K     0K     0K     0%    /system/object
swap                    17G   328K    17G     1%    /etc/svc/volatile
fd                       0K     0K     0K     0%    /dev/fd
swap                    17G    32K    17G     1%    /tmp
swap                    17G    32K    17G     1%    /var/run

Unfortunately hobbit just shows:
Filesystem            kbytes    used   avail capacity  Mounted on
swap                 17718392     328 17718064     1%
/etc/svc/volatile
swap                 17718088      32 17718056     1%    /tmp
/                          0 7029995 39920877    15%    /

Would you know why not all partitions are monitored?

If no, could you please provide me a hint on how to diagnose this
problem?

Thanks in advance for your answer.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkob89wACgkQPzupdm8BofyE3QCgkt7elQfIS9GKRIc9cWBJKwXP
JKcAnjlUI+OdAuhE5lTFSUSke7ZmhvxU
=ytg5
-----END PGP SIGNATURE-----
list Benoit Schmid · Wed, 27 May 2009 07:52:05 +0200 ·
quoted from Dominique Frise
-----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?
quoted from Great D Dilla

Thanks in advance for your answer.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoc1QIACgkQPzupdm8BofxOaQCgiBI4vF3dAy0fhzJGi/8AcWoL
9XcAn2ruNYO/mbX/RvvkjLUKpsLW9uXH
=kRIa
-----END PGP SIGNATURE-----
list Dominique Frise · Wed, 27 May 2009 08:09:56 +0200 ·
quoted from Benoit Schmid
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