Operating System - HP-UX
1832992 Members
2525 Online
110048 Solutions
New Discussion

Re: Simple question about RAM checking

 
Sunny Chen
Occasional Advisor

Simple question about RAM checking

I use "Glance" find out my HP server 's memory is 100% FULL, my question is :
" If I don't use "glance", which hp-ux command can be used to check memory usage?"
" After that, which command I can use to get the process id that use the most ram?"

Thank you very much!
Life is 10 percent what you make it and 90 percent how you take it.
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: Simple question about RAM checking

Sunny:

# swapinfo -ta

Also vmstat and sar can be very useful. See the man pages for both.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Simple question about RAM checking

Hi:

Oh, almost forgot, 'top' is good for looking at indivicual processes' memory. See man pages for top.

...JRF...
Alan Riggs
Honored Contributor

Re: Simple question about RAM checking

To find which processes are using the most memory, you can use the ps command. To use teh XPG4 flags, t is necessary to set the UNIX95 environmental variable.

export UNIX95=1
ps -e -o "user,pid,ppid,sz,vsz,comm" | sort -rn +4|more
Tim Malnati
Honored Contributor

Re: Simple question about RAM checking

Hey Alan,

Good call! Works like a charm, and with Linux too. I was not very aware of UNIX95 prior to this (heard of it), but it suggests that a considerable amount of portability issues can be easily dealt with. Thanks again.
Alan Riggs
Honored Contributor

Re: Simple question about RAM checking

You're welcome. I was happy when I learned about it, too.

I used to like the old Berkley flags (ps gv, etc.) on AIX and was frustrated when I could not get the same functionaliy on hp. I had never tried it on linux -- glad to know it unctions there, too.