1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Fix grep command

This commit is contained in:
rfrail3 2012-09-19 08:49:07 +02:00
parent 4771fd2b53
commit d189784ce2
3 changed files with 5 additions and 5 deletions

View file

@ -59,9 +59,9 @@ if [ "$1" = "config" ]; then
exit 0
fi
VAL1=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | wc -l`
VAL1=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | wc -l`
VAL2=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | awk '{s+=$6} END {print s}'`
VAL2=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | awk '{s+=$6} END {print s}'`
VAL3=`expr $VAL2 / $VAL1`

View file

@ -58,7 +58,7 @@ if [ "$1" = "config" ]; then
exit 0
fi
VAL1=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | wc -l`
VAL1=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | wc -l`
echo "servers.value $VAL1"

View file

@ -62,10 +62,10 @@ PROCS=$binname
# Catch proccess pid
VAL1=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | awk '{print $2}' `
VAL1=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | awk '{print $2}' `
# Count pids
COUNT=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | wc -l`
COUNT=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | wc -l`
# Read threads per pid
for i in $VAL1; do