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 ?
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 ?