With ps
command I can find out how much memory each program uses:
ps -u mertnuhoglu -o pcpu,rss,pid,command
Is it possible to find out the sums of each type of resource usage as well, easily?
memoryps
With ps
command I can find out how much memory each program uses:
ps -u mertnuhoglu -o pcpu,rss,pid,command
Is it possible to find out the sums of each type of resource usage as well, easily?
Best Answer
You could sum the usage columns with
awk
:You might also be interested in the
free
command for memory usage:The output is in kilobytes (use
free --mega
for megabytes orfree -m
for mebibytes). In particular, theused
,+/- buffers/cache
entry is something like the total physical memory used (by everyone).