Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Location
    Tampa, Florida
    Posts
    80

    Qmail stats and command line manipulation ?

    Anybody know how to manipulate the output of qmail-qstat so that it just displays the number of messages in queue in stdout.

    I'm taking this command/output

    Code:
    [[email protected] zabbix]# /var/qmail/bin/qmail-qstat
    messages in queue: 40
    messages in queue but not yet preprocessed: 0
    and trying to make the messages in queue the only result in stdout, but i can only get this so far

    Code:
    [[email protected] zabbix]# su - root -c /var/qmail/bin/qmail-qstat |cut -f2 -d":"
     40
     0
    Anybody got a better solution, I just want the result to be "40"
    eWebtricity
    Hosting | Web Design | Server Administration
    http://www.ewebtricity.net | [email protected]
    http://www.1and1faq.com 1and1 Customer Support

  2. #2
    Join Date
    Feb 2004
    Posts
    772
    Hi,

    You can find out how things are running by:

    qmailctl stat

    You should see an output like this:

    /service/qmail-send: up (pid 29956) 2 seconds
    /service/qmail-send/log: up (pid 29960) 2 seconds
    /service/qmail-smtpd: up (pid 29963) 2 seconds
    /service/qmail-smtpd/log: up (pid 29968) 2 seconds
    /service/qmail-pop3d: up (pid 29971) 2 seconds
    /service/qmail-pop3d/log: up (pid 29972) 2 seconds
    messages in queue: 0
    messages in queue but not yet preprocessed: 0

    Please refer the link http://www.qmailrocks.org/start_qmail.htm

    Regards,
    Brightadmin
    Bright Info Solutions

  3. #3
    Join Date
    Oct 2004
    Location
    Tampa, Florida
    Posts
    80
    thanks, i'm trying to screen scrape the number of messages in queue to feed into our monitoring application. I can't seem to get the number of messages value all by itself becuase the number of messages preprocessed keeps getting in the way.

    How do I isolate the "number of messages in queue"
    eWebtricity
    Hosting | Web Design | Server Administration
    http://www.ewebtricity.net | [email protected]
    http://www.1and1faq.com 1and1 Customer Support

  4. #4
    Join Date
    Oct 2004
    Location
    Tampa, Florida
    Posts
    80
    Found a way around it, we modified the qmail-qstat script and just edited out what we didn't want. But now our monitoring system is running as it's own user and doesn't have permissions to access the queue directories. Hmmm, i'm not sure how to get around this right now.
    eWebtricity
    Hosting | Web Design | Server Administration
    http://www.ewebtricity.net | [email protected]
    http://www.1and1faq.com 1and1 Customer Support

  5. #5
    Hello,
    Add that user in "qmail" group (the user which you are running your monitering system as) "qmail" group have access to queue directories and messages (read only), so it should let your monitering system access the same if you add your monitering system user in "qmail" group.
    Let me know what you are trying to accomplish in detail, so that i can suggest a suitable solution

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •