1 Reply Latest reply: Jul 14, 2009 12:26 PM by 807567 RSS

    dskPercent not returned for ZFS filesystems?

    807567
      Hello.

      I'm trying to monitor the space usage of some ZFS filesystems on a Solaris 10 10/08 (137137-09) Sparc system with SNMP. I'm using the Systems Management Agent (SMA) agent.

      To monitor the stuff, I added the following to /etc/sma/snmp/snmpd.conf and restarted svc:/application/management/sma:default:
      # Bug in SMA? 
      # Reporting - NET-SNMP, Solaris 10 - has a bug parsing config file for disk space.
      # -> http://forums.sun.com/thread.jspa?threadID=5366466
      disk /proc 42%  # Dummy Wert; wird fälschlicherweise ignoriert werden...
      disk / 5%
      disk /tmp 10% 
      disk /apps 4%
      disk /data 3%
      Now I'm checking what I get via SNMP:
      --($ ~)-- snmpwalk -v2c -c public 10.0.1.26 dsk
      UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
      UCD-SNMP-MIB::dskIndex.2 = INTEGER: 2
      UCD-SNMP-MIB::dskIndex.3 = INTEGER: 3
      UCD-SNMP-MIB::dskIndex.4 = INTEGER: 4
      UCD-SNMP-MIB::dskPath.1 = STRING: /
      UCD-SNMP-MIB::dskPath.2 = STRING: /tmp
      UCD-SNMP-MIB::dskPath.3 = STRING: /apps
      UCD-SNMP-MIB::dskPath.4 = STRING: /data
      UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/md/dsk/d200
      UCD-SNMP-MIB::dskDevice.2 = STRING: swap
      UCD-SNMP-MIB::dskDevice.3 = STRING: apps
      UCD-SNMP-MIB::dskDevice.4 = STRING: data
      UCD-SNMP-MIB::dskMinimum.1 = INTEGER: -1
      UCD-SNMP-MIB::dskMinimum.2 = INTEGER: -1
      UCD-SNMP-MIB::dskMinimum.3 = INTEGER: -1
      UCD-SNMP-MIB::dskMinimum.4 = INTEGER: -1
      UCD-SNMP-MIB::dskMinPercent.1 = INTEGER: 5
      UCD-SNMP-MIB::dskMinPercent.2 = INTEGER: 10
      UCD-SNMP-MIB::dskMinPercent.3 = INTEGER: 4
      UCD-SNMP-MIB::dskMinPercent.4 = INTEGER: 3
      UCD-SNMP-MIB::dskTotal.1 = INTEGER: 25821143
      UCD-SNMP-MIB::dskTotal.2 = INTEGER: 7150560
      UCD-SNMP-MIB::dskTotal.3 = INTEGER: 0
      UCD-SNMP-MIB::dskTotal.4 = INTEGER: 0
      UCD-SNMP-MIB::dskAvail.1 = INTEGER: 13584648
      UCD-SNMP-MIB::dskAvail.2 = INTEGER: 6471520
      UCD-SNMP-MIB::dskAvail.3 = INTEGER: 0
      UCD-SNMP-MIB::dskAvail.4 = INTEGER: 0
      UCD-SNMP-MIB::dskUsed.1 = INTEGER: 11978284
      UCD-SNMP-MIB::dskUsed.2 = INTEGER: 679040
      UCD-SNMP-MIB::dskUsed.3 = INTEGER: 0
      UCD-SNMP-MIB::dskUsed.4 = INTEGER: 0
      UCD-SNMP-MIB::dskPercent.1 = INTEGER: 47
      UCD-SNMP-MIB::dskPercent.2 = INTEGER: 9
      UCD-SNMP-MIB::dskPercent.3 = INTEGER: 0
      UCD-SNMP-MIB::dskPercent.4 = INTEGER: 0
      UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 9
      UCD-SNMP-MIB::dskPercentNode.2 = INTEGER: 0
      UCD-SNMP-MIB::dskPercentNode.3 = INTEGER: 0
      UCD-SNMP-MIB::dskPercentNode.4 = INTEGER: 0
      UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: noError(0)
      UCD-SNMP-MIB::dskErrorFlag.2 = INTEGER: noError(0)
      UCD-SNMP-MIB::dskErrorFlag.3 = INTEGER: noError(0)
      UCD-SNMP-MIB::dskErrorFlag.4 = INTEGER: noError(0)
      UCD-SNMP-MIB::dskErrorMsg.1 = STRING: 
      UCD-SNMP-MIB::dskErrorMsg.2 = STRING: 
      UCD-SNMP-MIB::dskErrorMsg.3 = STRING: 
      UCD-SNMP-MIB::dskErrorMsg.4 = STRING: 
      As expected, dskPercent.1 and dskPercent.2 (ie. */* and */tmp*) returned good values. But why did Solaris/SNMP/??? return 0 for dskPercent.3 (*/apps*) and dskPercent.4 (*/data*)? Those directories are on two ZFS which are on seperate zpools:
      --($ ~)-- zpool list
      NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
      apps  39.2G  20.4G  18.9G    51%  ONLINE  -
      data   136G   121G  15.2G    88%  ONLINE  -
      
      --($ ~)-- zfs list apps data
      NAME   USED  AVAIL  REFER  MOUNTPOINT
      apps  20.4G  18.3G    20K  /apps
      data   121G  13.1G   101K  /data
      Or is it supposed to be that way? I'm pretty much confused, because I found some blog posting by a guy called asyd at http://sysadmin.asyd.net/home/en/blog/asyd/zfs+snmp. Copying from there:
      snmpwalk -v2c -c xxxx katsuragi.global.asyd.net UCD-SNMP-MIB::dskTable
      [..]
      UCD-SNMP-MIB::dskPath.1 = STRING: /
      UCD-SNMP-MIB::dskPath.2 = STRING: /home
      UCD-SNMP-MIB::dskPath.3 = STRING: /data/pkgsrc
      [..]
      UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/dsk/c1d0s0
      UCD-SNMP-MIB::dskDevice.2 = STRING: data/home
      UCD-SNMP-MIB::dskDevice.3 = STRING: data/pkgsrc
      [..]
      UCD-SNMP-MIB::dskTotal.1 = INTEGER: 1017935
      UCD-SNMP-MIB::dskTotal.2 = INTEGER: 0
      UCD-SNMP-MIB::dskTotal.3 = INTEGER: 0
      [..]
      UCD-SNMP-MIB::dskAvail.1 = INTEGER: 755538
      UCD-SNMP-MIB::dskAvail.2 = INTEGER: 0
      UCD-SNMP-MIB::dskAvail.3 = INTEGER: 0
      [..]
      UCD-SNMP-MIB::dskPercent.1 = INTEGER: 21
      UCD-SNMP-MIB::dskPercent.2 = INTEGER: 18
      UCD-SNMP-MIB::dskPercent.3 = INTEGER: 5
      What I find confusing, are his dskPercent.2 and dskPercent.3 outputs - for him, he got back dskPercent for what seems to be directories on ZFS filesystems.

      Because of that I'm wondering about how it is supposed to be - should Solaris return dskPercent values for ZFS?+

      Thanks a lot,
      Alexander
        • 1. Re: dskPercent not returned for ZFS filesystems?
          807567
          I don't have the ability to test out my theory, but I suspect that you are using the default mount created for the zpools you've created (apps & data) as opposed to specific ZFS files systems, which is what the asyd blog shows.

          Remember, the elements reported on in the asyd blog ARE zfs file systems; they are not just directories. They are indeed mountpoints, and it is reporting the utilization of those zfs file systems in the pool ("data") on which they are constructed. In the case of /home, the administrator has specifically set the mountpoint of the ZFS file system to be /home instead of the default /data/home.

          To test my theory, instead of using your zpool default mount point, try creating a zfs file system under each of your pools and using that as the entry point for your application to write data into the zpools. I suspect you will be rewarded with the desired result: reporting of "disk" (really, pool) percent usage.