-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpfpm_processes
executable file
·39 lines (36 loc) · 1 KB
/
phpfpm_processes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# -*- sh -*-
#
# Plugin to monitor the number of PHP5-FPM processes on the machine.
#
# Copyright TJ Stein 2010 http://constantshift.com
#
# Modified by Leander / True:
# 18-01-2013 Removed hard-coded PHP-FPM daemon and made it Ubuntu Lucid / Precise compatible
#
# Parameters:
#
# config (required)
# autoconf (optional - used by munin-config)
#
# Magick markers (optional - used by munin-config and som installation
# scripts):
#%# family=manual
#%# capabilities=autoconf
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title PHP5-FPM Processes'
echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel PHP5-FPM Processes'
echo 'graph_category PHP'
echo 'graph_info This graph shows the number of PHP5-FPM processes in the system.'
echo 'php_processes.label PHP5-FPM Processes'
echo 'php_processes.draw LINE2'
echo 'php_processes.info The current number of PHP5-FPM processes.'
exit 0
fi
echo -n "php_processes.value "
ps awwwux | egrep "[p]hp5-fpm|[p]hp-fpm" | wc -l