2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

2011-01-01, guilloux : find commands & plugin conf improvements. Tested on an Ubuntu 10.10 server

This commit is contained in:
Ronan 2011-01-01 11:13:54 +01:00 committed by Steve Schnepp
parent ea1e17cc51
commit 67ff8900dd

View File

@ -10,9 +10,15 @@
# Authors
# ~~~~~~~
# Benjamin Schweizer <code at benjamin-schweizer dot de>
# Ronan Guilloux <ronan at coolforest dot net>
# Copy this to your node's config file (default: plugin-conf.d/munin-node):
# [php_sessions]
# user root
#
# Changes
# ~~~~~~~
# 2011-01-01, guilloux : find commands & plugin conf improvements
# 2008-10-15, schweizer: added active sessions
# 2008-10-10, schweizer: forked from munin_squid_efficiency
# 2006-10-11, schweizer: initial release.
@ -24,7 +30,6 @@
#%# family=auto
#%# capabilities=autoconf
SESSION_DIR="/var/lib/php5/"
if [ "$1" = "autoconf" ]; then
@ -51,8 +56,8 @@ if [ "$1" = "config" ]; then
exit 0
fi
ACTIVE_SESSIONS_NUM=`find /var/lib/php5/sess_* -amin -5 | wc -l`
TOTAL_SESSIONS_NUM=`find /var/lib/php5/sess_* | wc -l`
ACTIVE_SESSIONS_NUM=`find /var/lib/php5/ -type f -iname "sess_*" -amin -5 | wc -l`
TOTAL_SESSIONS_NUM=`find /var/lib/php5/ -type f -iname "sess_*" | wc -l`
echo "sessions.value ${TOTAL_SESSIONS_NUM}"
echo "asessions.value ${ACTIVE_SESSIONS_NUM}"