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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory footprint

Status
Not open for further replies.

andy61

Technical User
Apr 19, 2006
59
GB
I've been asked to supply the memory footprint of a user on an AIX 5.1 system.For a snapshot I thought I'd run
ps -lfu pro|awk '{if ( $10 != "SZ") {t+=$10}} END {print t}'
7055636

The problem is when I run the command for the system as a whole I get a value that exceeds the total of system memory and paging space used by about 50% and greater than the vitrual memory as returned by svmon -G. I guess some shared segments are counted for each process using them.

I've used svmon -U and the total of Inuse is about that returned by ps ie more than the memory and used paging combined. Running svmon -U pro, the Inuse figure is slightly lower than using ps.

Does anyone know the definitive way to calculate the memory used by a user ? Do I have to script the output of svmon to only count shared frames/pages once ?

 
Can you show us some output from your command and the output from bootinfo -r and/or lsattr -El sys0 -a realmem

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Mike,
Thanks for replying. I get the terrible feeling, I've missed something very obvious here, or I've miscounted the number of digits somewhere ! Here's the output from the various commands:


#Used by pro
ps -lfu pro|awk '{if ($10!="SZ"){t+=$10}}END{print t}'
6456356 KB

#Used by pro (svmon)
svmon -U pro|head -4

===============================================================================
User Inuse Pin Pgsp Virtual LPageCap
pro 1046273 4782 813 800794 -

#Inuse in 4KB blocks so 1046273*4 = 4185092 KB


#System total used (KB)
ps -lfe |awk '{if ($10!="SZ"){t+=$10}}END{print t}'
38439664 KB

svmon -U|grep -p User 2>/dev/null|egrep -v "^==|^User|^$"|awk '{t+=$2} END {print t}'
9955910
#Inuse in 4KB blocks so 9955910*4 = 39823640 KB

#System memory resources
svmon -G
size inuse free pin virtual
memory 6291440 6290168 1272 338768 3014022
pg space 3145728 9954

work pers clnt lpage
pin 338523 245 0 0
in use 3013836 3276332 0 0

lsattr -El mem0
size 24576 Total amount of physical memory in Mbytes False
goodsize 24576 Amount of usable physical memory in Mbytes False

#Paging space
lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 12288MB 1 yes yes lv
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top