Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using ps to get swap size

Status
Not open for further replies.

Chrissirhc

Programmer
May 20, 2000
926
GB
Hi,

I need to create a script that allows me to check the memory a process is taking up. How do I modify the ps command to give me the memory taken up?

I don't know how to get details out of top because it seems to just continue running e.g. I can't seem to use top | grep processName


Thanks,

Chris
 
some unix versions support the -o option with additional flags with ps. Best have a look at the man page.
 
I had a look but couldn't find anything. Anyone know (I'll take a look into top -n as well).

Cheers,

Chris
 
Depends on your flavor of *NIX.

On Sun/Solaris:
ps -o vsz
or
ps -o rss

'man ps' for other oprtion.

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top