Sha256: b500a31940918ad08c2bfc641f9d07740acac5e4133196db5eb9f32403921c70
Contents?: true
Size: 1.03 KB
Versions: 7
Compression:
Stored size: 1.03 KB
Contents
#!/bin/sh # -*- sh -*- # # Plugin to monitor the average process size of PHP5-FPM on the machine. # # Copyright TJ Stein 2010 http://constantshift.com # # Parameters: # # config (required) # autoconf (optional - used by munin-config) # # Magick markers (optional - used by munin-config and som installation # scripts): #%# family=manual #%# capabilities=autoconf PHP_BIN=${phpbin-"php5-fpm"} if [ "$1" = "autoconf" ]; then echo yes exit 0 fi if [ "$1" = "config" ]; then echo 'graph_title PHP5-FPM Average Process Size' echo 'graph_args --base 1024 -l 0 ' echo 'graph_vlabel PHP5-FPM Average Process Size' echo 'graph_category PHP' echo 'graph_info This graph shows the average process size for PHP5-FPM' echo 'php_average.label PHP5-FPM Average Proccess Size' echo 'php_average.draw LINE2' echo 'php_average.info The average process size for PHP5-FPM' exit 0 fi echo -n "php_average.value " ps awwwux | grep $PHP_BIN | grep -v grep | grep -v master | awk '{total_mem = $6 * 1024 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'
Version data entries
7 entries across 7 versions & 1 rubygems