How Do I Know the Memory Used by Apps

Posted by user176890 on Server Fault See other posts from Server Fault or by user176890
Published on 2013-11-05T03:21:33Z Indexed on 2013/11/05 3:58 UTC
Read the original article Hit count: 389

Filed under:
|
|

Is it possible to know the memory used by any apps running on my linux server?

I'm using the following command to know how much memory used by php-fpm.

ps -ylC php5-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%s\n", "Total memory used by PHP-FPM child processes: "; printf "%dM\n", s/1024 }'

Given the command above, I want to know the memory used by all apps with an example output below:

PHP-FPM: 2.3gb MySQL: 5gb nginx: 200mb dovecot: 100mb memcached: 573mb

© Server Fault or respective owner

Related posts about monitoring

Related posts about memory