Originally posted by: emreb
Hii I am really very confused about per process memory usage :(
How can I determine that a process how much memory consuming ?
I am using
svmon -Pt15 | perl -e 'while(){print if($.==2||$&&&!$s++);$.=0 if(/^-+$/)}'|awk '{x=x+$3} END {print "Total MEM:" (x*4)/1024/1024}'
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd 16MB
1200292 disp+work 592057 65584 23201 589046 Y N N
1478760 disp+work 500884 65584 19619 496386 Y N N
1458380 disp+work 485566 65584 21202 482582 Y N N
1466580 disp+work 485136 65584 19267 480201 Y N N
1450186 disp+work 484914 65584 18997 479827 Y N N
1560696 disp+work 484512 65584 18893 479299 Y N N
1806520 disp+work 476821 65584 18714 471612 Y N N
1470712 disp+work 471043 65584 18508 465778 Y N N
1347740 disp+work 470231 65584 19569 465975 Y N N
1355930 disp+work 467233 65584 21955 464533 Y N N
1867776 disp+work 466935 65584 29230 468546 Y N N
1269780 disp+work 464805 65584 18629 459544 Y N N
1495262 disp+work 462240 65584 19822 457802 Y N N
1540204 disp+work 458349 65584 22274 457312 Y N N
1368224 disp+work 457805 65584 24384 458810 Y N N
This output gives to me 28 gb memory usage
svmon -g gives
size inuse free pin virtual
memory 8126464 6495479 1630985 667138 6819632
pg space 8388608 850222
work pers clnt other
pin 394236 0 0 272902
in use 6059997 9 435473
PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 6376071 842206 601090 6689456
m 64 KB - 7463 501 4128 8136
If I calculate non root users cumulative memory usage via
ps aux | head -1; ps aux |sort -rn +5 |awk '$1 !~/root/ {print $1,$2,$3,$4,$5,$6,$10,$11;x=x+$6} END {print "Total MEM:" x}'
This output gives 6.gb utilization.
Which one I could trust ? how svmon -p is greater than svmon -G ? RES field in Ps aux is gives real or close to real consumption ?
Best Regards
#AIX-Forum