Hi All,

Please tell me the option to ps formatted output (ps -o) that lists
the total main memory used by a process.

When I included rss field the total value shown is 30G whereas my machine has
only 6GB RAM and 12GB swap.  Please explain on this.

###

# ps -u ordaea2i -o "rss"|grep -v '^ RSS'|awk '{sum+=$1} END {print sum}'
12436536
# ps -u ortaea2i -o "rss"|grep -v '^ RSS'|awk '{sum+=$1} END {print sum}'
19760168
# bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
(12436536 + 19760168)/1024/1024
30
quit
# free
             total       used       free     shared    buffers     cached
Mem:       6052040    5979708      72332    1259120     130276    3216052
-/+ buffers/cache:    2633380    3418660
Swap:     12578832     684000   11894832
#

###

Thanks,
S. Subin


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-india-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to