Skip to content

Instantly share code, notes, and snippets.

View srgkas's full-sized avatar

Serhii Kasianchuk srgkas

View GitHub Profile
@geraldvillorente
geraldvillorente / php.md
Created July 26, 2017 07:03
How to check an average memory usage by single PHP-FPM process
ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
ps --no-headers -o "rss,cmd" -C apache2 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'