Ad Widget

Collapse

what is the parameter used for finding the dead mails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mary nancy
    Senior Member
    • Jul 2005
    • 125

    #1

    what is the parameter used for finding the dead mails

    Hi

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


    Regards
  • riegersteve
    Member
    • Oct 2004
    • 68

    #2
    i would use a combination of mailq grep and cut

    Comment

    • suhani
      Junior Member
      • Jul 2005
      • 2

      #3
      Thank you for ur suggestion.
      Can u be a little ellaborate on this

      Comment

      • cadbury
        Member
        • Apr 2005
        • 77

        #4
        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

        Comment

        Working...