The rest of the lines are what you have already seen when mailstats was run without the -p.
The M heading and attractive horizontal lines are missing, but the data is the same in both
cases.
If the user running the mailstats program has write permission to the statistics file, this -p
switch will also cause that file??™s contents to become zeroed. If the user running the program
lacks write permission to the statistics file, that file??™s contents will not be zeroed. Zeroing
and not zeroing are silent. You need to run the mailstats program a second time to discover
whether the statistics file has been zeroed.
Beginning withV8.12 sendmail, you can use the -P command-line switch(discussed next)
to print statistics in program-friendly form, without zeroing the statistics.
Note that the -o switchcan be combined withth e -p switchto produce program-friendly
output that excludes the last, human-readable column:
% mailstats -p -o
938478602 938718475
0 0 0 247 686 0 0
3 42 96 2 5 0 0
5 472 1710 10 22 5 0
T 514 1806 259 713 5 0
C 514 259 5
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
370 | Chapter 10: Build and Use Companion Programs
10.4.4.6 -P
Produce program-friendly output and don??™t clear statistics file mailstats command-line switch
Parsing of the mailstats program??™s output can be made more program-friendly withth e use
of the -p command-line switchdescribed earlier.
Pages:
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668