root / plugins / other / scalix_processes @ fcd1327d
Historique | Voir | Annoter | Télécharger (1,11 ko)
| 1 |
#!/bin/sh |
|---|---|
| 2 |
# |
| 3 |
# Plugin to monitor the Scalix email system: Process statistics |
| 4 |
# |
| 5 |
# (C) 2008 P.Holzleitner |
| 6 |
# |
| 7 |
#%# family=contrib |
| 8 |
|
| 9 |
if [ "$1" = "config" ]; then |
| 10 |
|
| 11 |
echo 'graph_title Scalix processes' |
| 12 |
echo 'graph_args --lower-limit 0' |
| 13 |
echo 'graph_vlabel number' |
| 14 |
echo 'graph_category Scalix' |
| 15 |
echo 'mimeb.label MIME Browser processes' |
| 16 |
echo 'indexb.label Index Browser processes' |
| 17 |
echo 'imap.label IMAP Server processes' |
| 18 |
echo 'pop3.label POP3 Server processes' |
| 19 |
echo 'postgres.label Postgres threads' |
| 20 |
echo 'ualr.label UAL Remote (RCI) processes' |
| 21 |
echo 'xport.label xport.out processes' |
| 22 |
echo 'jthread.label Java threads' |
| 23 |
exit 0 |
| 24 |
fi |
| 25 |
|
| 26 |
MIMEB=`pgrep mime.browse | wc -l` |
| 27 |
INDEXB=`pgrep index.browse | wc -l` |
| 28 |
IMAP=`pgrep in.imap41d | wc -l` |
| 29 |
POP3=`pgrep pop3.server | wc -l` |
| 30 |
POSTGRES=`pgrep -f postgres | wc -l` |
| 31 |
UALR=`pgrep ual.remote | wc -l` |
| 32 |
XPORT=`pgrep xport.out | wc -l` |
| 33 |
JPID=`pgrep java` |
| 34 |
JTHREAD=`ls -1 /proc/$JPID/task | wc -l` |
| 35 |
echo "mimeb.value $MIMEB" |
| 36 |
echo "indexb.value $INDEXB" |
| 37 |
echo "imap.value $IMAP" |
| 38 |
echo "pop3.value $POP3" |
| 39 |
echo "postgres.value $POSTGRES" |
| 40 |
echo "ualr.value $UALR" |
| 41 |
echo "xport.value $XPORT" |
| 42 |
echo "jthread.value $JTHREAD" |
