Operating System - Linux
1753867 Members
7386 Online
108809 Solutions
New Discussion

Re: how to calculate the memory utilization in process wise

 
rajesh73
Super Advisor

how to calculate the memory utilization in process wise

i want to check the top memory utilization process, please find the below output and adcise

 

$free -g
             total       used       free     shared    buffers     cached
Mem:            47         44          2          0          0         39
-/+ buffers/cache:          4         42
Swap:           33          0         33

 

top command we find the below error


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
27679 raj 25   0 2384m 2.1g 122m R 399.4  4.4   4209:40 vm5_1_1_sm
15978 lij       16   0 2004m 1.7g  15m D  1.7  3.5  25:19.87 java
 5045 root      15   0  500m 331m 3084 S  0.0  0.7  22:05.72 snmpd
28630 ganesh    19   0  546m 282m  55m R 197.5  0.6 181:12.56 vm_s_R5_1_1_sm

258      jude           5   0   55m    253m  55mR 1.6 0.1 50:12 t2d3_sm

 

 

memory (%MEM) = 4.4+3.5+0.7+0.6 = 9.2

 

from the above calculation shall i take memory utization 90%

 

 

1 REPLY 1
irshad_m
Established Member

Re: how to calculate the memory utilization in process wise

This will report the percentage of memory in use %

#free | grep Mem | awk '{print $3/$2 * 100.0}'

 

also use 'ps aux ' command, parameter gives the correct memory usage or maybe memory leak after few hours VSZ(virtual mem) and RSS(resident set size).