PDA

View Full Version : what is the parameter used for finding the dead mails


mary nancy
07-07-2005, 02:29
Hi

what is the parameter used for finding the dead mails and total pending mails etc


Regards

riegersteve
07-07-2005, 04:42
i would use a combination of mailq grep and cut

suhani
08-07-2005, 01:26
Thank you for ur suggestion.
Can u be a little ellaborate on this

cadbury
08-07-2005, 10:54
be careful with mailq, it have to be run with superuser account, on other case it will only display the user's mail
the agent run under the zabbix user, you may have to use sudo too

the following commands can be useful for UserParam :
grep
cut
wc -l (to return the number of lines)
tr -d " " (to remove the unneeded spaces before using cut)

see the man for more details
just an example :
mysqladmin -uroot extended-status | grep Questions | cut -d \| -f 3 --output-delimiter="" | tr -d " "
mysqladmin -uroot extended-status : is quite explicit
grep Questions : select the line with the total number of questions since mysql restart
cut -d \| -f 3 --output-delimiter="" : returns the 3rd column (the number of questions), each column separated by a "|" (which have to be escaped with a "\")
and tr -d " " : which removes some head and trail spaces

i can't help you with mailq command, i don't use it
hope it can help you btw

Clement