Skip to content

Instantly share code, notes, and snippets.

@hussanhijazi
Last active December 31, 2015 13:59
Show Gist options
  • Save hussanhijazi/7997504 to your computer and use it in GitHub Desktop.
Save hussanhijazi/7997504 to your computer and use it in GitHub Desktop.
bash script conta processos
while [[ true ]] ; do ps aux | grep php-fpm | wc -l; sleep 1 ; done;
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 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment