Xymon Mailing List Archive search

Monitoring memory on AIX

6 messages in this thread

list Stef Coene · Wed, 28 Feb 2007 11:49:33 +0100 ·
Hi,

I changed hobbitgraph.cfg so it created to extra graphs: one for Access Virtual Memory and one for the free list.  See http://www.docum.org/twiki/bin/view/Hobbit/AixTips
Henrik, can you add these graph definitions ?


I also patched the hobbit server so it monitors the Access Virtual Memory on AIX:

diff hobbit-4.2.0/hobbitd/client/aix.c hobbit-4.2.0.ori/hobbitd/client/aix.c
73c73
<               long memphystotal, memphysused, memphysfree, memactused, memswaptotal, memswappct;
---
              long memphystotal, memphysused, memphysfree, memswaptotal, 
memswappct;
80d79
<               if (sscanf(freememstr, "%*d %*d %ld", &memactused) == 1) memactused /= 256;
88c87
<                               memphystotal, (memphystotal - memphysfree), memactused,
---
                              memphystotal, (memphystotal - 
memphysfree), -1,
Henrik : The only problem is that Total for the line Actual is always the amount of Physical Memory.  But this should be Physical Memory + Swap Memory.  At least, this is for AIX, but I think this is for other os'es as well.  I think this is a bug.

The problem is that Actual can be > 100%.  So, I had to change ./hobbitd/rrd/do_memory.c and remove the > 100% to get some graphs:
   //if ((actval >= 0) && (actval <= 100)) {
   if (actval >= 0 ) {
      sprintf(rrdfn, "memory.actual.rrd");
                                                 
Stef
list Stef Coene · Thu, 1 Mar 2007 16:16:36 +0100 ·
Henrik (and others), any comments on this post ?
quoted from Stef Coene


On Wednesday 28 February 2007 11:49, Stef Coene wrote:
Hi,

I changed hobbitgraph.cfg so it created to extra graphs: one for Access
Virtual Memory and one for the free list.  See
http://www.docum.org/twiki/bin/view/Hobbit/AixTips
Henrik, can you add these graph definitions ?


I also patched the hobbit server so it monitors the Access Virtual Memory
on AIX:

diff hobbit-4.2.0/hobbitd/client/aix.c
hobbit-4.2.0.ori/hobbitd/client/aix.c 73c73
<               long memphystotal, memphysused, memphysfree, memactused,
memswaptotal, memswappct;
---
              long memphystotal, memphysused, memphysfree, memswaptotal,
memswappct;
80d79
<               if (sscanf(freememstr, "%*d %*d %ld", &memactused) == 1)
memactused /= 256;
88c87
<                               memphystotal, (memphystotal - memphysfree),
memactused,
---
                              memphystotal, (memphystotal -
memphysfree), -1,

Henrik : The only problem is that Total for the line Actual is always the
amount of Physical Memory.  But this should be Physical Memory + Swap
Memory. At least, this is for AIX, but I think this is for other os'es as
well.  I think this is a bug.

The problem is that Actual can be > 100%.  So, I had to
change ./hobbitd/rrd/do_memory.c and remove the > 100% to get some graphs:
   //if ((actval >= 0) && (actval <= 100)) {
   if (actval >= 0 ) {
      sprintf(rrdfn, "memory.actual.rrd");


Stef

list Neil D. ManTech Ctr Camp · Thu, 1 Mar 2007 10:36:10 -0500 ·
 Hello,

I know this has been brought up before, but I was wondering if any has
had any luck. Has any been able to integrate the SAR like capability of
LARRD from Big Brother into Hobbit? Thanks!
list Neil D. ManTech Ctr Camp · Fri, 2 Mar 2007 07:14:27 -0500 ·
Please disregard this message, sorry for the duplicate.  
quoted from Neil D. ManTech Ctr Camp

-----Original Message-----
From: Camp, Neil D. (ManTech) CTR [mailto:user-3fcfcd65045e@xymon.invalid] 
Sent: Thursday, March 01, 2007 10:36 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] SAR

 Hello,

I know this has been brought up before, but I was wondering if any has
had any luck. Has any been able to integrate the SAR like capability of
LARRD from Big Brother into Hobbit? Thanks!
list Stef Coene · Sat, 3 Mar 2007 12:53:54 +0100 ·
On Thursday 01 March 2007 16:16, Stef Coene wrote:
Henrik (and others), any comments on this post ?
Since no one wants to respond, I will do it myself ;)
quoted from Stef Coene
Henrik : The only problem is that Total for the line Actual is always the
amount of Physical Memory.  But this should be Physical Memory + Swap
Memory. At least, this is for AIX, but I think this is for other os'es as
well.  I think this is a bug.

The problem is that Actual can be > 100%.  
The problem with using Accessed Virtual Memory as monitoring for memory usage is that this can be more then 100%.  This numbers is inflated on AIX.  I still don't know how this can, but AIX does pre-allocation for swap.  So some parts of memory have a copy in cache and are counted twice.

Anyhow, this number is still important to monitor.  But some special care is needed.  First of all
- Actual can be > 100%
- the maximum for Actual is amount of memory + swap (currently this is only the amount for memory)
- for AIX, the warning and error thresholds for Actual needs to set higher because this number is bigger then you would normally expected.

See my first post for some patches.


Stef
list Stef Coene · Sat, 3 Mar 2007 12:53:56 +0100 ·
quoted from Stef Coene
On Thursday 01 March 2007 16:16, Stef Coene wrote:
Henrik (and others), any comments on this post ?
Since no one wants to respond, I will do it myself ;)
I changed hobbitgraph.cfg so it created to extra graphs: one for Access
Virtual Memory and one for the free list.  See
http://www.docum.org/twiki/bin/view/Hobbit/AixTips
Henrik, can you add these graph definitions ?
Henrik, can you add these to hobbitgraph.cfg: 
[vmstat-avm]
        TITLE Memory Accessed Virtual Memory
        YAXIS Size kB
        -b 1024
        DEF:avm=vmstat.rrd:mem_avm:AVERAGE
        CDEF:sw=avm,4048,*
        LINE2:sw#00CC00:
        GPRINT:sw:LAST:Accessed Virtual Memory  \: %5.1lf%s (cur)
        GPRINT:sw:MAX: \: %5.1lf%s (max)
        GPRINT:sw:MIN: \: %5.1lf%s (min)
        GPRINT:sw:AVERAGE: \: %5.1lf%s (avg)\n

[vmstat-free-list]
        TITLE Memory free list
        YAXIS pages kB
        -b 1024
        DEF:free=vmstat.rrd:mem_free:AVERAGE
        CDEF:fr=free,4048,*
        LINE2:fr#00CC00
        GPRINT:fr:LAST:Size of the free list \: %5.1lf%s (cur)
        GPRINT:fr:MAX: \: %5.1lf%s (max)
        GPRINT:fr:MIN: \: %5.1lf%s (min)
        GPRINT:fr:AVERAGE: \: %5.1lf%s (avg)\n


Stef