Projet

Général

Profil

Révision d189784c

IDd189784ce252f9f488ffa51a303acb75f2d5bfcf
Parent 4771fd2b
Enfant a5fd2bed, 8410e921

Ajouté par rfrail3 il y a environ 13 ans

Fix grep command

Voir les différences:

plugins/apache/apache_memmory
59 59
	exit 0
60 60
fi
61 61

  
62
VAL1=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | wc -l`
62
VAL1=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | wc -l`
63 63

  
64
VAL2=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | awk '{s+=$6} END {print s}'`
64
VAL2=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | awk '{s+=$6} END {print s}'`
65 65

  
66 66
VAL3=`expr $VAL2 / $VAL1`
67 67

  
plugins/apache/apache_servers
58 58
	exit 0
59 59
fi
60 60

  
61
VAL1=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | wc -l`
61
VAL1=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | wc -l`
62 62

  
63 63
echo "servers.value $VAL1"
64 64

  
plugins/apache/apache_threads
62 62

  
63 63

  
64 64
# Catch proccess pid
65
VAL1=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | awk '{print $2}' `
65
VAL1=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | awk '{print $2}' `
66 66

  
67 67
# Count pids
68
COUNT=`ps auxf | grep ${PROCS} | grep ${USR} | grep -v grep | wc -l`
68
COUNT=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | wc -l`
69 69

  
70 70
# Read threads per pid
71 71
for i in $VAL1; do

Formats disponibles : Unified diff