AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Calculate the memory usage of the specfic process

  • 1.  Calculate the memory usage of the specfic process

    Posted Wed December 06, 2006 04:47 AM

    Originally posted by: SystemAdmin


    Hi All ,

    I have problem to find out the memory usage of the specific process. The ps and svmon command output entirely contradictory. And moreover the memory usage of specific process using svmon which reveals huge numbers in page frames inuse) which is higher than the total pageframes in the system.
    svmon shows the more or less same memory usage to all the process.

    For instance :

    For init process it shows inuse column reveals huge memory usage.
    1. svmon -P 1

    Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd 16MB
    1 init 268451632 268435459 27 268451731 N N N

    Vsid Esid Type Description PSize Inuse Pin Pgsp Virtual
    0 0 work kernel (lgpg_vsid=0) L 65536 65536 0 65536
    1d109d d work shared library text s 16002 0 3 16090
    40045 2 work process private s 105 3 17 122
    1a001b f work shared library data s 53 0 7 63
    180019 1 clnt code,/dev/hd2:534 s 9 0 - -
    161 - clnt /dev/hd4:1465 s 7 0 - -
    Can you please help me to find out the memory usage of the process and also
    teach how to coorelate the output to ps command. Here i have enclosed the
    process output for your verification. Please do the needfull.
    OSlevel : IBM Aix 5.3.0.0

    SVMON output For specfic process

    1. svmon -P 954790 | head


    Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd 16MB
    954790 java 268568703 268435549 3 268552821 N Y N

    Vsid Esid Type Description PSize Inuse Pin Pgsp Virtual
    0 0 work kernel (lgpg_vsid=0) L 65536 65536 0 65536
    25b83 3 work working storage s 65527 0 0 65527
    1b5bda 4 work working storage s 35228 0 0 35228
    1d109d d work unused segment s 15991 0 3 16085
    SVMON output for total system

    svmon -G
    size inuse free pin virtual
    memory 3932160 3765814 166346 701536 1776892
    pg space 131072 9110

    work pers clnt
    pin 701536 0 0
    in use 1773446 0 1992368

    Pscommand output

    1. ps gv 954790
    PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
    954790 - A 2:30 6987 403888 403944 32768 39 56 0.1 3.0 java
    1. bc -l
    403888 * 1024
    413581312
    413581312/4096
    100972.00000000000000000000
    quit
    1. ps gv 954790
    PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
    954790 - A 2:30 6987 403940 403996 32768 39 56 0.1 3.0 java
    1. bc -l
    403940 * 1024
    413634560
    quit

    Thanks & Regards,
    Sriram Varadharajan


  • 2.  Re: Calculate the memory usage of the specfic process

    Posted Wed December 06, 2006 11:26 AM

    Originally posted by: SystemAdmin


    Sri: as you're starting to discover memory measurement in AIX is more a matter of art than science. The heart of the problem is that memory means different things in different contexts, virtual versus real not least, and the terminology used leaves something to be desired in consistency.

    The best reference for this that I know of the performance tools redbook http://www.redbooks.ibm.com/abstracts/sg246039.html?Open
    Look especially at chapters 8 and 24.

    In more general terms, what are you trying to accomplish with this exercise?

    Regards,

    Jim Lane


  • 3.  Re: Calculate the memory usage of the specfic process

    Posted Sun December 10, 2006 09:01 PM

    Originally posted by: BruceSpencer


    Measuring memory utilization gets complicated very quickly. If all you are looking for a rough estimate of memory usage by application, try configuring WLM in passive mode. You'll need to assign your application to its own "class".