NAME
mailstats - 显示邮件状态信息
总览
mailstats [-o] [-C cffile] [-f stfile]
描述
mailstats工具显示当前的邮件状态信息。
首先,先显示统计启动时所记录的时间,当然是以ctime(3)所指定的格式。然后每行显示一个邮件程序的统计,而每行都以空格把下面这些字段分隔开:
- M
- 邮件程序号码
- msgsfr
- 该邮件程序接收的信件数
- bytes_from
- 该邮件程序接收的信件容量
- msgsto
- 该邮件程序发出的信件数
- bytes_to
- 该邮件程序发出的信件容量
- msgsrej
- 退回的信件数
- msgsdis
- 丢弃的信件数
- Mailer
- 该邮件程序名
显示完这些后,用一行对所有邮件程序的所有值进行合计,中间用一行等号把它和上面的内容隔开。
该程序有以下选项:
- -C
- 读取指定的文件来替换缺省的sendmail的"cf"文件。
- -f
- 读取指定的统计文件来替换在sendmail的"cf"文件中所指定的那个统计文件。
- -o
- 在输出中不显示邮件程序名。
该程序运行正常返回0,出错返回大于0的任何值。
文件
- /etc/sendmail.cf
- 缺省的sendmail的"cf"文件。
- /var/log/sendmail.st
- 缺省的sendmail的统计文件。
另见
mailq(1),sendmail(8)
#p#
NAME
mailstats - display mail statistics
SYNOPSIS
mailstats [-c] [-o] [-p] [-P] [-C cffile] [-f stfile]
DESCRIPTION
The mailstats utility displays the current mail statistics.
First, the time at which statistics started being kept is displayed, in the format specified by ctime(3). Then, the statistics for each mailer are displayed on a single line, each with the following white space separated fields:
- 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.
- msgsqur
- Number of messages quarantined.
- Mailer
- The name of the mailer.
After this display, a line totaling the values for all of the mailers is displayed (preceded with a ``T''), separated from the previous information by a line containing only equals (``='') characters. Another line preceded with a ``C'' lists the number of TCP connections.
The options are as follows:
- -C
- Read the specified file instead of the default sendmail configuration file.
- -c
- Try to use submit.cf instead of the default sendmail configuration file.
- -f
- Read the specified statistics file instead of the statistics file specified in the sendmail configuration file.
- -P
- Output information in program-readable mode without clearing statistics.
- -p
- Output information in program-readable mode and clear statistics.
- -o
- Don't display the name of the mailer in the output.
The mailstats utility exits 0 on success, and >0 if an error occurs.
FILES
- /etc/mail/sendmail.cf
- The default sendmail configuration file.
- /var/log/mail/statistics
- The default sendmail statistics file.
SEE ALSO
mailq(1), sendmail(8)