AIX

AIX

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

 View Only
  • 1.  Which process is using swap?

    Posted Wed January 16, 2008 08:53 AM

    Originally posted by: SystemAdmin


    AIX 5.3
    4 GB RAM
    2 GB swap

    Using svmon, I see that I have 25 MB of free memory
    Using lsps, I see that I am using 18% swap

    Is there a way that I can identify the process/processess that are using swap?

    Thanks!

    DaveZ


  • 2.  Re: Which process is using swap?

    Posted Wed January 16, 2008 08:58 AM

    Originally posted by: orphy


    Try svmon -P.
    Orphy


  • 3.  Re: Which process is using swap?

    Posted Wed January 16, 2008 09:00 AM

    Originally posted by: SystemAdmin


    Unfortunately, I have over 100 processess running....

    Is there another way?

    If not, what am I looking for in the output that would show me
    that the particular process is in swap?

    Thanks!


  • 4.  Re: Which process is using swap?

    Posted Wed January 16, 2008 09:14 AM

    Originally posted by: orphy


    Take a look at the svmon manpage. svmon -P <pid> might get you what you need. At least it'll narrow down your list to the PID(s) you have questions with.
    Orphy


  • 5.  Re: Which process is using swap?

    Posted Wed January 16, 2008 10:37 AM

    Originally posted by: SystemAdmin


    OK

    I used svmon -P and through grep, awk and expr, getting "pgsp" value,I determined
    that 2.9 GB of swap was being used...

    I only have 2 GB

    ???


  • 6.  Re: Which process is using swap?

    Posted Wed January 16, 2008 10:46 AM

    Originally posted by: orphy


    Nobody says the AIX VMM is easy to understand - I'm quite often confused still. Here's from svmon manpage.

    A segment can be used by multiple processes. Each page from such a segment
    is accounted for in the inuse, pin, virtual or pgspace fields for each
    process that uses the segment. Therefore, the total of the inuse, pin,
    virtual and pgspace fields over all active processes may exceed the total
    number of pages in memory or on paging space.

    Orphy


  • 7.  Re: Which process is using swap?

    Posted Wed January 16, 2008 10:52 AM

    Originally posted by: SystemAdmin


    Thanks!

    I thought it may be more complex than a simple set of commands...

    The more I use svmon, the more confused I get...

    Once, I got a value for one process "Inuse" of 47 GB

    My RAM was 2 GB
    My swap was 4 GB

    Go figure....

    :0)

    Thanks!

    DaveZ


  • 8.  Re: Which process is using swap?

    Posted Wed January 16, 2008 01:59 PM

    Originally posted by: SystemAdmin


    Try the following :

    1) ps gv | head -n 1; ps gv | egrep -v "RSS" | sort +6b -7 -n -r
    ( SIZE—The actual amount of paging space allocated for this process )

    2)svmon -P | grep -p PID

    Mustafa


  • 9.  Re: Which process is using swap?

    Posted Wed March 05, 2008 01:22 PM

    Originally posted by: SystemAdmin


    You're on the right track. Use svmon like this:

    svmon -P <pid>

    In the output, you'll see a column up top called "Pgsp"; this will
    tell you, in 4K pages (assuming the process doesn't use larger pages)
    how much paging space that particular process is using.