logconv.pl script parses the access log and returns summary information on different users and operations that have been run on the server.
At its simplest, the script simply parses the access log (or logs):
# logconv.pl /relative/path/to/accessLog
The script can accept wildcards to parse multiple access logs, which is useful if log rotation is used.
# logconv.pl /var/log/dirsrv/slapd-instance/access*
The different options for
logconv.pl are covered in the manpage and in the Configuration and Command-Line Tool Reference.
There are several different ways that
logconv.pl can be used to pull general usage information from the access logs.
At its simplest,
logconv.pl prints a list of total operations, total number of connections, counts per each operation type, counts for some extended operations like persistent searches, and bind information.
# logconv.pl /var/log/dirsrv/slapd-instance/access
Access Log Analyzer 8.1
Command: logconv.pl /var/log/dirsrv/slapd-instance/access
Processing 1 Access Log(s)...
 /var/log/dirsrv/slapd-instance/access size (bytes): 141640
Total Log Lines Analysed: 1056
----------- Access Log Output ------------
Start of Logs: 18/Nov/2016:10:43:55
End of Logs: 18/Nov/2016:12:25:02
Processed Log Time: 1 Hours, 41 Minutes, 7 Seconds
Total Connections: 29
- LDAP Connections: 29
- LDAPI Connections: 0
- LDAPS Connections: 0
- StartTLS Extended Ops: 0
Peak Concurrent Connections: 5
Total Operations: 481
Total Results: 479
Overall Performance: 99.6%
Searches: 326 (0.05/sec) (3.22/min)
Modifications: 15 (0.00/sec) (0.15/min)
Adds: 107 (0.02/sec) (1.06/min)
Deletes: 0 (0.00/sec) (0.00/min)
Mod RDNs: 0 (0.00/sec) (0.00/min)
Compares: 0 (0.00/sec) (0.00/min)
Binds: 31 (0.01/sec) (0.31/min)
Proxied Auth Operations: 0
Persistent Searches: 0
Internal Operations: 0
Entry Operations: 0
Extended Operations: 0
Abandoned Requests: 0
Smart Referrals Received: 0
VLV Operations: 2
VLV Unindexed Searches: 0
VLV Unindexed Components: 2
SORT Operations: 14
Entire Search Base Queries: 42
Paged Searches: 0
Unindexed Searches: 0
Unindexed Components: 41
FDs Taken: 29
FDs Returned: 29
Highest FD Taken: 69
Broken Pipes: 0
Connections Reset By Peer: 0
Resource Unavailable: 0
Max BER Size Exceeded: 0
- LDAP v2 Binds: 0
- LDAP v3 Binds: 31
- AUTOBINDs: 0
- SSL Client Binds: 0
- Failed SSL Client Binds: 0
- SASL Binds: 0
- Directory Manager Binds: 20
- Anonymous Binds: 8
- Other Binds: 3
Cleaning up temp files...
In addition to the summary information for operations and connections, more detailed summary information for all of the connections to the server. This information includes things like most common IP addresses used to connect to the server, DNs with the most failed login attempts, total bind DNs used to access the server, and the most common error or return codes.
Additional connection summaries are passed as a single option. For example, listing the number of DNs used to connect to the server (
b) and the total connection codes returned by the server (
c) are passed as
# logconv.pl -bc /var/log/dirsrv/slapd-instance/access
----- Total Connection Codes -----
U1 3 Cleanly Closed Connections
B1 1 Bad Ber Tag Encountered
----- Top 20 Bind DN's -----
Number of Unique Bind DN's: 212
1801 cn=directory manager
1297 Anonymous Binds
The data can be limited to entries after a certain start time (
-S), before a certain end time (
-E), or within a range. When start and end times are set, the
logconv.pl first prints the time range given, then the summary for that period.
# logconv.pl -S "[01/Jul/2016:16:11:47.000000000 -0400]" -E "[01/Jul/2016:17:23:08.999999999 -0400]" /var/log/dirsrv/slapd-instance/access
----------- Access Log Output ------------
Start of Logs: 01/Jul/2016:16:11:47
End of Logs: 01/Jul/2016:17:23:08
The start and end period only sets time limits for the data used to generate the total summary counts. It still shows aggregated, or total, counts. To get a view of the patterns in connections and operations to the Directory Server, it is possible to output data with counts per minute (
-M) or per second (
-m). In this case, the data are printed, in time unit increments, to a specified CSV output file.
# logconv.pl -m|-M outputFile accessLogFile
# logconv.pl -M /home/output/statsPerMin.txt /var/log/dirsrv/slapd-instance/access*
-M|-m options can also be used with the
-E arguments, to get per-minute or per-second counts within a specific time period.
Each row in the file represents one unit of time, either minute or second, with total counts for that time period. The CSV file (for both per-minute and per-second statistics) contains the following columns, in order:
Time,time_t,Results,Search,Add,Mod,Modrdn,Delete,Abandon,Connections,SSL Conns,Bind,Anon Bind,Unbind,Unindexed
The CSV file can be manipulated in any spreadsheet program, like OpenOffice Calc, and in many other business applications. The procedures for importing the CSV data and generating charts or other metrics depends on the application itself.
For example, to create a chart in OpenOffice Calc:
Open the CSV file.
Click the menu, and select .
In the Chart Type area, set the chart type to XY (Scatter).
Set the subtype to lines only.
Select the option to sort by X values.
Accept the defaults in the other screens (particularly, to use the data series in columns and to set the first row and first column as labels), and create the chart.