Tom Duerbusch wrote:
Hi Ray.

I tried your script on some of my images.  Works fine, except when Oracle is 
involved.

linux62:~ # ps -eo pmem | awk '{pmem += $1};END {print "pmem ="pmem"%"}';
pmem =1347.1%
I do have a lot of swap blocks allocated.  This is due to a batch type run, 
that is run off hours.  During the day, when users are on, we swap very little.

So if this does include swap pages, I don't think the script would give me what 
I need, during normal processing.  Do you agree?  Or am off track here?

Thanks

Tom Duerbusch
THD Consulting

"Mrohs, Ray" <ray.mr...@usdoj.gov> 7/23/2010 1:45 PM >>>
Start up all your Linux procs and then run this little script.

#! /bin/sh
ps -eo pmem | awk '{pmem += $1}; END {print "pmem = "pmem"%"}';

It will give you a ballpark percentage of current memory utilization.
I tuned some Apache/ftp servers down to 100M with no ill effects.


To (maybe) alleviate the problem with oracle, add a sort step:

ps -eo pmem,cmd | sort -u -k2 | awk '{pmem += $1}; END {print "pmem =
"pmem"%"}';

This sorts by the second (and subsequent) key and drops duplicates. Be
aware it has its own problem, if you have lots of different copies of a
program (bash maybe) with the same commandline arguments, it will be
counted once.

You could also experiment with start time and any other sort keys that
seem attractive.



--

Cheers
John

-- spambait
1aaaa...@coco.merseine.nu  z1aaaa...@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to