Xymon Mailing List Archive search

zonemem.ksh

1 message in this thread

list Vernon Everett · Tue, 13 May 2014 09:28:01 +0800 ·
Hi Roger

I think you are looking at 2 separate issues here.

The "n/a" in the memory cap is probably showing up because you have no
memory cap on that zone.
Check this bit of the code.

*if [ -z $MEMCAP ]*
   then
      MEMFREE=$MEMFREE_GLOBK
      PCT_USED=$PCT_USEDG
      *CAP="n/a"*
      MEMFREEL=$MEMFREE_GLOBK
      PCT_USED=$PCT_USEDG
      # No cap, we look at the total free.
   else

The zone name getting truncated has got to do with the string definition,
which is important to ensure correct formatting of the displayed output.
Check this bit of code.

*typeset -L10 ZONE*
typeset -R5 MEMCAP SWAPCAP CAP
typeset -R6 PCT_USED PCTSWAP
typeset -R8 MEMUSED MEMFREE TOTMEMFREE GLOBUSED RSS PCT_USEDG SWAP

As you can see, the ZONE(name) is a string, 10 characters long, left
justified.
Change the L10 to whatever fits for your zone names. L15 will probably work
fine.

Regards
Vernon


On 13 May 2014 04:01, Roger Jerdez <user-ef6ac7806f50@xymon.invalid> wrote:
zonemem.ksh
   Author
 Vernon Everett <user-b3f8dacb72c8@xymon.invalid>
 Compatibility
 Xymon 4.2
 Requirements
 It monitors zones, so I guess Solaris is pretty important.
 Download
 None
 Last Update
 2013-08-02


Hi

Everett, I found a Little issue with the script when it is graphicating
the values for my zones, if the zone has a name more long that 10
characteres it is showing N/A for the MEMCAP value. Do u have any idea why
is happening in order to modify the script and fix this

zarespp1    8G     84.14%    1299M    6893M       5.26%  |    32G
71.88%       23G [image: yellow]
zprdaresw   n/a      4.77%        G    6249M       4.77%  |    n/a
30.21%       18G

zprdaresweb1 the name of the last zone that is not alarmed is zprdaresweb1
and only is showing zprdaresw and it is not showing the MEMCAP, any idea

Regards
Roger Jerdez
-- 
"Accept the challenges so that you can feel the exhilaration of victory"
- General George Patton