I was done a very usefull script (at least for me) to check qmail status,
with this script you can take a screenshoot of current inbound connections
(qmail-smtpd), remote concurrency (qmail-remote), total mails in the queue
and some information abount the tcp stack.
I was implemented it with a cron to run every one minute, then I upload
this logs to a MySQL database, with this information then I make some
graphics to get a general situtation of my mail servers from a php3 page.
Bye.
Ricardo D. Albano
[EMAIL PROTECTED]
Here is the script:
#! /bin/sh
current_smtpd=$(ps -ef | grep smtpd | grep -v grep | wc -l)
current_queue=$(/usr/local/sbin/qmail queue | grep "messages in queue:" |
awk '{print $4;}')
current_remote=$(ps -ef | grep qmail-remote | grep -v grep | wc -l)
current_tcp=$(netstat -n | grep tcp | wc -l)
current_date=$(date +%Y-%m-%d' '%k:%M:%S)
current_host=$(hostname)
echo
$current_date,$current_host,$current_smtpd,$current_remote,$current_queue,$c
urrent_tcp