[prev in list] [next in list] [prev in thread] [next in thread] 

List:       aix-l
Subject:    Re: Memory Usage
From:       Mitch Harding <hardingm () AUSTIN ! IBM ! COM>
Date:       2000-04-11 16:35:50
[Download RAW message or body]


Ryan Gamo wrote:
> Is there another way to
> effectively monitor memory usage without buying an external product? My
> idea is to have a script run every so often just so I know what's going on
> in semi-real time. Korn shell only please.

If you know which process you wish to monitor, you could use ps to track
its size:
  ps v <pid>

You can also use the following to monitor the X process, as well as the
three other largest processes (by memory usage):

  # Output some information about the X server process (cpu usage,
memory usage, etc)
  ps auxc <X pid>
  # Output the same information about the top three largest (based on
RAM use) processes
  ps auxc | grep -v "<defunct>" | grep -v -w X | sed -e "1d" | sort +5
-6 -rn | head -3

And if you have it, the "svmon" utility can be used to monitor memory
usage.  You can use it to monitor a process, or memory in general:
svmon -P <pid>
svmon -G

Hope this helps you out.

--
Mitch Harding    512-838-8842    mitcharf@psw.com
Product Verification Testing     PSW Technologies
http://www.mitcharf.com/

"It's fascinating to think that all around us
there's an invisible world we can't even see. I'm
speaking, of course, of the World of the
Invisible Scary Skeletons."
  - Jack Handey

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic