Книга: Linux Network Administrator Guide, Second Edition

hoststat

hoststat

The hoststat command displays information about the status of hosts that sendmail has attempted to deliver mail to. The hoststat command is equivalent to invoking sendmail as:

sendmail -bh

The output presents each host on a line of its own, and for each the time since delivery was attempted to it, and the status message received at that time.

Example 18.6 shows the sort of output you can expect from the hoststat command. Note that most of the results indicate successful delivery. The result for earthlink.net, on the other hand, indicates that delivery was unsuccessful. The status message can sometimes help determine the cause of the failure. In this case, the connection timed out, probably because the host was down or unreachable at the time delivery was attempted.

Example 18.6: Sample Output of the oststat Command

# hoststat
-------------- Hostname ---------- How long ago ---------Results---------
mail.telstra.com.au                    04:05:41 250 Message accepted for
scooter.eye-net.com.au              81+08:32:42 250 OK>

yarrina.connect.com.a               53+10:46:03 250 LAA09163 Message acce
happy.optus.com.au                  55+03:34:40 250 Mail accepted
mail.zip.com.au                        04:05:33 250 RAA23904 Message acce
kwanon.research.canon.com.au        44+04:39:10 250 ok 911542267 qp 21186
linux.org.au                        83+10:04:11 250 IAA31139 Message acce
albert.aapra.org.au                    00:00:12 250 VAA21968 Message acce
field.medicine.adelaide.edu.au      53+10:46:03 250 ok 910742814 qp 721
copper.fuller.net                   65+12:38:00 250 OAA14470 Message acce
amsat.org                            5+06:49:21 250 UAA07526 Message acce
mail.acm.org                        53+10:46:17 250 TAA25012 Message acce
extmail.bigpond.com                 11+04:06:20 250 ok
earthlink.net                       45+05:41:09 Deferred: Connection time

The purgestat command flushes the collected host data and is equivalent to invoking sendmail as:

# sendmail -bH

The statistics will continue to grow until you purge them. You might want to periodically run the purgestat command to make it easier to search and find recent entries, especially if you have a busy site. You could put the command into a crontab file so it runs automatically, or just do it yourself occasionally.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.609. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз