I'm looking into doing a few performance tweaks by adjusting my max memory on a few lpars.
I would to create a time stamp script so i could review it for a week and determine how much space i can lower my max memory to so i could reclaim and allocate that memory to where it is needed the most.
I know the command I need is
svmon -P -v -t 10 | more
I am not sure how to create a timestamp in ksh. I've tried a few things but not working.
Basically I want to capture my real memory usage every hour... I will create my cronjob to run it every hour on the hour, I also need it output to a file.
(echo "\n" ;date; echo "\n") >svmon-P-v-t20.out
svmon -P -v -t 10 >>svmon-P-v-t20.out
#
more svmon-P-v-t20.out
Fri Jun 29 17:26:12 DFT 2012
-------------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd 16MB
1491100 svmon 41250 7232 49 41192 Y N N
PageSize Inuse Pin Pgsp Virtual
s 4 KB 3074 0 49 3016
m 64 KB 2386 452 0 2386
Vsid Esid Type Description PSize Inuse Pin Pgsp Virtual
188060 90000000 work fork tree m 1897 0 0 1897
children=5a74d0, 0
8002 0 work fork tree m 484 449 0 484
children=802760, 0
14005 9ffffffd work fork tree sm 1775 0 34 1807
children=7f12a0, 0
a532d 90020014 work shared library s 835 0 13 837
8262a 11 work text data BSS heap sm 152 0 0 152
3000c 9ffffffe work fork tree sm 151 0 2 151
children=5a8fb0, 0
7ce95 f00000002 work process private m 5 3 0 5
d273d 9001000a work shared library data sm 45 0 0 45
3d785 80020014 work USLA heap sm 16 0 0 16
61611 8fffffff work private load data s 5 0 0 5
...
Just to make sure too, if you're going to run it hourly you want to change the date to append instead of replace. Your output file will be a little short otherwise.