[hobbit] Important ! HP-UX and the memory utilization

Scheblein, Adam adam.scheblein at marquette.edu
Thu Jul 27 20:06:41 CEST 2006


Without Glance (which I am going to assume that everyone does not always
have), you have a serious task of scripting and calculating ahead of
you. Memory usage in HP-UX is extremely complex. Unlike simple OS maps,
HP-UX has memory objects such as the kernel, the dynamic buffer cache,
shared libraries, shared executables, memory mapped files, and user
program data areas.

Many of these elements directly affect the use of memory, and others are
shared which essentially reduces the use of memory. Most of these values
require intimate knowledge of kernel entry points and will require
looking at the HP-UX Internals book.

So to answer the question how much RAM does each program consume? then a
crude answer is this line:

UNIX95= ps -e -o vsz

>From there you can sum it up, and use that as a more accurate, but still
crude estimate of HP-UX memory utilization

Adam

> -----Original Message-----
> From: Henrik Stoerner [mailto:henrik at hswn.dk]
> Sent: Thursday, July 27, 2006 11:58 AM
> To: hobbit at hswn.dk
> Subject: Re: [hobbit] Important ! HP-UX and the memory utilisation
> 
> On Thu, Jul 27, 2006 at 02:46:07PM +0200, thomas.seglard.enata at cnp.fr
> wrote:
> > Thanks for your explanation ! I'm sorry to insist but it's a bit
hard to
> > understand. I think the true problem is the "reserved" memory. It's
a
> > maximum value and may not be used totally. For me, the real
information
> is
> > on the first line and given by the swapdisk. In my example, I got a
> total of
> > 24G for swapping (also called paging by HP) and only 23% is used.
> >
> > Moreover, to determine the total physical memory used, a little
script
> > called "hpux_memory" is launched. I got very different results
between
> > this script and "swapinfo -Mm" :
> >
> > bash-3.00$ ./hpux-meminfo
> > Total:16372
> > Free:212
> >
> > So, on my hobbit display I got percentage of memory utilisation >
95%
> > whereas I got 29% with the other command !! Where is the truth ?!
> >
> > bash-3.00$ /usr/sbin/swapinfo -Mm
> >             Mb         Mb         Mb        PCT
> > TYPE      AVAIL    USED    FREE  USED
> > memory  16372   4770     11602     29%
> 
> hpux-meminfo.c uses two HP library functions to get the memory
> details:
> 
> 	pstat_getstatic(&sbuf, sizeof(sbuf), 1, 0);
> This provides the amount of RAM installed, and appears to agree
> with your "swapinfo -Mm" output (both say 16372).
> 
> 	pstat_getdynamic(&dbuf, sizeof(dbuf), 1, 0);
> This returns a "struct" (table of values) where the "psd_free" item is
> described as "Physical pages that the system considers to be unused
and
> available to processes". (I believe this is described in the
> /usr/include/sys/pstat.h file). Through some calculations using the
> pagesize value also returned by pstat_getstatic, it reaches the
> value you get for MB free memory.
> 
> I'm not saying one or the other value is the "right" one, I don't have
> enough knowledge of HP-UX to judge which one is right. If the HP-UX
> knowledgable people around this list can let me know how to best
> determine the memory pressure, I'll be happy to re-do the HP-UX code
> to work with that.
> 
> 
> > For the swap or paging memory, "swapinfo -dm" :
> 
> The Hobbit client uses "swapinfo -tm". According to the HP-UX manpage,
> you only get a subset of the swap space information when using the
"-d"
> option, which results in a misleading total:
> 
>     -t Add a totals line with a TYPE of total. This line totals only
>        the paging information displayed above it, not all paging
areas;
>        this line might be misleading if a subset of -dfrM is specified
>     -d Print information about device paging areas only.
>     -f Print information about file system paging areas only.
>     -r Print information about reserved paging space only.
>     -M Print information about memory paging space only.
> 
> (From http://docs.hp.com/en/B2355-90692/swapinfo.1M.html)
> 
> 
> Regards,
> Henrik
> 
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
> 




More information about the Xymon mailing list