eximstats - generates statistics from Exim mainlog or syslog files.
2. SYNOPSIS ▲
eximstats [Output] [Options] mainlog1 mainlog2 ... eximstats -merge [Options] report.1.txt report.2.txt ... > weekly_report.txt
2.1. Output: ▲
-txt 4 Output the results in plain text to STDOUT.
-txt=filename 4 Output the results in plain text. Filename '-' for STDOUT is accepted.
-html 4 Output the results in HTML to STDOUT.
-html=filename 4 Output the results in HTML. Filename '-' for STDOUT is accepted.
-xls 4 Output the results in Excel compatible Format to STDOUT. Requires the Spreadsheet::WriteExcel CPAN module.
-xls=filename 4 Output the results in Excel compatible format. Filename '-' for STDOUT is accepted.
2.2. Options: ▲
-hnumber 4 histogram divisions per hour. The default is 1, and 0 suppresses histograms. Valid values are: .Sp 0, 1, 2, 3, 5, 10, 15, 20, 30 or 60.
-ne 4 Don't display error information.
-nr 4 Don't display relaying information.
-nr/pattern/ 4 Don't display relaying information that matches.
-nt 4 Don't display transport information.
-nt/pattern/ 4 Don't display transport information that matches
-qlist 4 List of times for queuing information single 0 item suppresses.
-tnumber 4 Display top <number> sources/destinations default is 50, 0 suppresses top listing.
-tnl 4 Omit local sources/destinations in top listing.
-t_remote_users 4 Include remote users in the top source/destination listings.
-include_original_destination 4 Include the original destination email addresses rather than just using the final ones. Useful for finding out which of your mailing lists are receiving mail.
-show_dtlist 4 Show the delivery times (DT)for all the messages. .Sp Exim must have been configured to use the +delivery_time logging option for this option to work. .Sp list is an optional list of times. Eg -show_dt1,2,4,8 will show the number of messages with delivery times under 1 second, 2 seconds, 4 seconds, 8 seconds, and over 8 seconds.
-show_rtlist 4 Show the receipt times for all the messages. The receipt time is defined as the Completed hh:mm:ss - queue_time_overall - the Receipt hh:mm:ss. These figures will be skewed by pipelined messages so might not be that useful. .Sp Exim must have been configured to use the +queue_time_overall logging option for this option to work. .Sp list is an optional list of times. Eg -show_rt1,2,4,8 will show the number of messages with receipt times under 1 second, 2 seconds, 4 seconds, 8 seconds, and over 8 seconds.
-byhost 4 Show results by sending host. This may be combined with -bydomain and/or -byemail and/or -byedomain. If none of these options are specified, then -byhost is assumed as a default.
-bydomain 4 Show results by sending domain. May be combined with -byhost and/or -byemail and/or -byedomain.
-byemail 4 Show results by sender's email address. May be combined with -byhost and/or -bydomain and/or -byedomain.
-byemaildomain or -byedomain 4 Show results by sender's email domain. May be combined with -byhost and/or -bydomain and/or -byemail.
-pattern Description /Pattern/ 4 Look for the specified pattern and count the number of lines in which it appears. This option can be specified multiple times. Eg: .Sp -pattern \*(AqRefused connections\*(Aq \*(Aq/refused connection/\*(Aq
-merge 4 This option allows eximstats to merge old eximstat reports together. Eg: .Sp eximstats mainlog.sun > report.sun.txt eximstats mainlog.mon > report.mon.txt eximstats mainlog.tue > report.tue.txt eximstats mainlog.wed > report.web.txt eximstats mainlog.thu > report.thu.txt eximstats mainlog.fri > report.fri.txt eximstats mainlog.sat > report.sat.txt eximstats -merge report.*.txt > weekly_report.txt eximstats -merge -html report.*.txt > weekly_report.html
4 You can merge text or html reports and output the results as text or html.
4 You can use all the normal eximstat output options, but only data included in the original reports can be shown!
4 When merging reports, some loss of accuracy may occur in the top n lists. This will be towards the ends of the lists.
4 The order of items in the top n lists may vary when the data volumes round to the same value.
-charts 4 Create graphical charts to be displayed in HTML output. Only valid in combination with -html. .Sp This requires the following modules which can be obtained from http://www.cpan.org/modules/01modules.index.html
GDGraph 4 .Sp To install these, download and unpack them, then use the normal perl installation procedure: .Sp perl Makefile.PL make make test make install
.Sp On Debian GNU/Linux you can use \f(CW\*(C`apt-get install libgd-perl libgd-text-perl libgd-graph-perl\*(C'\fR instead.
-chartdirI <dir> 4 Create the charts in the directory <dir>
-chartrelI <dir> 4 Specify the relative directory for the \*(L"img src=\*(R" tags from where to include the charts
-emptyok 4 Specify that it's OK to not find any valid log lines. Without this we will output an error message if we don't find any.
-d 4 Debug flag. This outputs the eval()'d parser onto STDOUT which makes it easier to trap errors in the eval section. Remember to add 1 to the line numbers to allow for the title!
3. DESCRIPTION ▲
Eximstats parses exim mainlog and syslog files to output a statistical analysis of the messages processed. By default, a text analysis is generated, but you can request other output formats using flags. See the help (-help) to learn about how to create charts from the tables.
4. AUTHOR ▲
There is a web site at http://www.exim.org
5. TO DO ▲
This program does not perfectly handle messages whose received and delivered log lines are in different files, which can happen when you have multiple mail servers and a message cannot be immeadiately delivered. Fixing this could be tricky...
Merging of xls files is not (yet) possible. Be free to implement :)