1832949 Members
3199 Online
110048 Solutions
New Discussion

Re: ps -el output

 
SOLVED
Go to solution
Dave La Mar
Honored Contributor

ps -el output

I am looking for sz in k. Is this what I see from the output of ps -el. My dba wishes to monitor resource usage. Is there a better command other than top that he could use.
His real concern is memory usage.
Any insight will be appreciated.
dl
"I'm not dumb. I just have a command of thoroughly useless information."
5 REPLIES 5
Michael Tully
Honored Contributor

Re: ps -el output

You could try and use 'sar' but I would suggest you invest in glance. There is a 60 day trial copy on the application CD set. For memory it is on CD#2.

HTH
Michael
Anyone for a Mutiny ?
James R. Ferguson
Acclaimed Contributor
Solution

Re: ps -el output

Hi Dave:

Bill Hassell contributed this, now classic, method for rapidly viewing memory utilization at a process level:

# UNIX95= ps -e -o "user,vsz,pid,ppid,args"|sort -rnk2|more

Note the use of the POSIX (UNIX95) option of the 'ps' command to assist in this tracking, ranking the output in descending kilobyte core size. Note carefully that a space character follows the 'UNIX95' variable declaration and that the 'ps' command begins without any interceding delimiter. Thus, the variable UNIX95 is set only for the one command line.

...JRF...
someone_4
Honored Contributor

Re: ps -el output

Mr. "King" James (hope you are still reading this)

I got a few questions ..
Why is the POSIX shell being referred to as
UNIX95? Why does this command not work with out the
UNIX95 variable? When I do a man on ps to see what the
-o option is it says (XPG4 Only) what does that mean and is it
related to UNIX95? Finally is there was way to sort the ps command
by cpu usage like the top command?

Thanks Richard
Dave La Mar
Honored Contributor

Re: ps -el output

Thanks JRF. DBA is happy camper.
"I'm not dumb. I just have a command of thoroughly useless information."
James R. Ferguson
Acclaimed Contributor

Re: ps -el output

Hi Richard:

See here, for the answer to your question, above:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xfc5b46ff9277d511abcd0090277a778c,00.html

...JRF...