How Do I Know the Memory Used by Apps
- by user176890
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