monitors:memstat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
monitors:memstat [2013/02/12 02:40] – external edit 127.0.0.1monitors:memstat [2014/11/06 04:30] (current) – [memstat.ksh] vernon
Line 2: Line 2:
  
 ^ Author | [[ everett.vernon@gmail.com | Vernon Everett ]] | ^ Author | [[ everett.vernon@gmail.com | Vernon Everett ]] |
-^ Compatibility | Xymon, Solaris 10 (not tested on others) | +^ Compatibility | Xymon, Solaris 10, Solaris 11, Solaris 11.2 (not tested on others) | 
-^ Requirements | Solaris 10, rrdtool 1.2.x or later |+^ Requirements | Solaris 10, 11, 11.2, rrdtool 1.2.x or later |
 ^ Download | None | ^ Download | None |
-^ Last Update | <del>2010-06-10</del> <del>2013-01-03</del> 2013-02-12 |+^ Last Update | <del>2010-06-10</del> <del>2013-01-03</del> <del>2013-02-12</del> 2014-11-06|
  
 ===== Description ===== ===== Description =====
Line 15: Line 15:
 ===== Installation ===== ===== Installation =====
 === Client side === === Client side ===
- +
   * Copy memstat.ksh into xymon ~client/ext directory (usually in $XYMONCLIENTHOME/ext)   * Copy memstat.ksh into xymon ~client/ext directory (usually in $XYMONCLIENTHOME/ext)
-  * Copy getmemstat.ksh into xymon ~/client/ext directory, and change owner to root and set SUID.+  * Copy getmemstat.ksh into xymon ~/client/ext directory, 
 + 
 +For Solaris 11, or sites with restrictions on using setUID, ensure that the Xymon user has the ability to run getmemstat.ksh using sudo 
 + 
 +**Or**
  
 +Set up getmemstat.ksh with setUID
   chown root getmemstat.ksh   chown root getmemstat.ksh
   chmod 4755 getmemstat.ksh   chmod 4755 getmemstat.ksh
Line 54: Line 59:
 YELLOW=75 YELLOW=75
 RED=90 RED=90
 +USE_SUDO=yes
 date > $TEMPFILE date > $TEMPFILE
 echo >> $TEMPFILE echo >> $TEMPFILE
-$XYMONCLIENTHOME/ext/getmemstat.ksh > $TEMPFILE.data+if [ "$USE_SUDO" = "yes"
 +then 
 +   # You are probably on Solaris 11, and/or have set up sudo to grant Xymon user elevated access. 
 +   sudo $XYMONCLIENTHOME/ext/getmemstat.ksh | egrep -v "temporary|^Guest"
 +                                            | sed "s/ZFS Metadata/ZFS_Metadata/g"
 +                                            | sed "s/ZFS File Data/ZFS          /g" > $TEMPFILE.data 
 +else 
 +   # We can assume you have another way of granting elevated access, like setUID 
 +   $XYMONCLIENTHOME/ext/getmemstat.ksh | egrep -v "temporary|^Guest"
 +                                       | sed "s/ZFS Metadata/ZFS_Metadata/g"
 +                                       | sed "s/ZFS File Data/ZFS          /g" > $TEMPFILE.data 
 +fi
  
 cat $TEMPFILE.data  >> $TEMPFILE cat $TEMPFILE.data  >> $TEMPFILE
Line 111: Line 128:
   * **2013-02-12**   * **2013-02-12**
     * Changed the trends graph entry to **memstat::8**. Without it, in the trends column, the graph gets split into 2 graphs, which makes the visualisation of memory usage a little more difficult.     * Changed the trends graph entry to **memstat::8**. Without it, in the trends column, the graph gets split into 2 graphs, which makes the visualisation of memory usage a little more difficult.
 +  * **2014-11-05**
 +    * Changed script to give you option of running getmemstat.ksh as root using sudo or setUID
 +    * Change to cater for memstat/mdb changes in Solaris 11.2. \\ Some of the updates look great, but having 2 ZFS values (one for ZFS Metadata and the other for ZFS File Data) although useful, broke graphing. It's fixed now.\\ Also, please, can anybody tell me what the memstat value for "**Guest**" is? I suspect it's a memstat bug.\\ The same for the "In temporary use" that we see sometimes.\\ Yes, I am talking about the output of  ''echo "::memstat" | mdb -k'' on Solaris 11.2.
 +
 +
 +
 +
  • monitors/memstat.1360636807.txt.gz
  • Last modified: 2014/11/06 01:19
  • (external edit)