Subversion Repositories sysadmin_scripts

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 rodolico 1
#!/bin/bash
2
 
3
#getmailq.sh - written by Valec 2006. Steal and share.
4
#Get postfix queue lengths
5
 
6
#Place in /usr/local/bin/
7
#extend .1.3.6.1.4.1.2021.53.101.0 mailq /usr/local/bin/getmailq.sh
8
 
9
PATH=$PATH:/usr/sbin/
10
QUEUES="incoming active deferred hold"
11
 
12
for i in $QUEUES; do
13
        COUNT=`sudo qshape $i | grep TOTAL | awk '{print $2}'`
14
        printf "$i:$COUNT "
15
done