Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
m
mailstats(1) mailstats(1)
NAME
mailstats - print mail traffic statistics
SYNOPSIS
mailstats [-o][-C cffile][-f stfile ]
DESCRIPTION
mailstats reads and interprets the sendmail statistics file, /etc/mail/sendmail.st, then
prints out the mail traffic statistics. If /etc/mail/sendmail.st exists, sendmail collects statis-
tics about your mail traffic and stores them in the statistics file. This file does not grow.
Statistics are gathered on a per-mailer basis for each mailer defined in the sendmail configuration file.
Statistics are kept on the number of messages and the number of bytes for all inbound and outbound traffic.
The mailstats utility displays the time at which statistics collection was started on the rst line. Then,
the statistics of each mailer is displayed on a single line, each with the following white space separated
fields (see the "EXAMPLES" section below):
M The mailer number.
msgsfr Number of messages from the mailer.
bytes_from Kbytes from the mailer.
msgsto Number of messages to the mailer.
bytes_to Kbytes to the mailer.
msgsrej Number of messages rejected.
msgsdis Number of messages discarded.
Mailer The name of the mailer.
After this display, a line totaling the values for all of the mailers is displayed, separated from the previous
information by a line containing only equals (‘‘=’’) characters.
Options
The options are as follows:
-C Read the specified file instead of the default /etc/mail/sendmail.cf
file.
-f Read the specified statistics file instead of the statistics file specified in the
/etc/mail/sendmail.cf
file.
-o Do not display the name of the mailer in the output.
To clear the statistics file, execute, as root:
cp/dev/null/etc/mail/sendmail.st
RETURN VALUE
The mailstats utility exits 0 on success, and >0 if an error occurs.
DIAGNOSTICS
mailstats generates error messages if the statistics file is not accessible or if the size of the statistics file
has changed. Error messages are:
mailstats: file size changed
Either /etc/mail/sendmail.st
is zero length, meaning that no mail has been transferred
since it was cleared out, or its size has changed. Since the size of this file is supposed to remain
constant, any change in size means that the file is invalid.
mailstats: /etc/mail/sendmail.st: No such file or directory
The statistics file does not exist.
mailstats: /etc/mail/sendmail.st: Permission denied
The statistics file’s permissions are set so that you cannot read it.
EXAMPLES
Here is a typical example of mailstats output:
Section 1496 1 HP-UX Release 11i: December 2000
___
___