News for hackers. Stuff that matters.
Re:Print RAM Usage of process including children by torqu3e on Wednesday December 23, 2020 @08:23AM (#25517353)
All bash version of it... pgrep -f $1 | xargs -I{} pmap -x {} | grep total | awk '{sum=sum+$4}END{printf "%.2f%s", sum/1024," MB\n"}'

e.g.

$ pgrep -f bash | xargs -I{} pmap -x {} | grep total | awk '{sum=sum+$4}END{printf "%.2f%s", sum/1024," MB\n"}'

74.79 MB

There are no comments on this comment yet.