Chapter 8. Getting Directory Server access log using the command line
The logconv.pl command analyzes Directory Server access logs, extracts usage statistics, and counts occurrences of significant events specified on the command line. The logconv.pl command 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.
The logconv.pl command has the following syntax:
logconv.pl/path/to/accesslog
logconv.pl/path/to/accesslog
To analyze multiple access log files, you can use the following format with an asterisk (*):
logconv.pl /var/log/dirsrv/slapd-instance_name/access*
logconv.pl /var/log/dirsrv/slapd-instance_name/access*
The logconv.pl command generates following three types of statistics that are useful for monitoring the Directory Server and optimizing Directory Server configuration:
- Counts of events, such as total binds and total searches performed.
-
Lists of the most frequently occurring parameters in LDAP requests. For example, the
logconv.plcommand generates lists of the top ten bind DNs, base DNs, filter strings, and attributes returned. -
Counts of occurrences for error codes such as those defined in
ldap.h.
8.1. Analyzing Directory Server access logs using the command line Copy linkLink copied to clipboard!
The logconv.pl command analyzes Directory Server access logs and extracts usage statistics and counts occurrences of significant events.
The logconv.pl takes following options:
-
-S: specifies the time to begin the log file analysis. -
-E: specifies the time to stop the log files analysis. -
-bc: generates a report based on the number of DNs used to connect to the server and the total connection codes the server returns. -
-m: generates output data per second (-m) to a specified CSV output file. -
-M: generates output data with counts per minute (-M) to a specified CSV output file.
Procedure
To generate a simple access log summary, run the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
logconv.plscript 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.Optional: If you must enable additional connection summaries passed as a single option, such as the number of DNs used to connect to the server (
b) and the total connection codes the server (c) returns, specify the-bcoption as follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If you must enable data output for a certain start (
-S) and end time (-E) or within a specific range, run the following commandCopy to Clipboard Copied! Toggle word wrap Toggle overflow When start and end times are set, the
logconv.plcommand first prints the time range given, then the summary for that period.Optional: If you must enable data output with counts per minute (
-M) or per second (-m), run the following command:logconv.pl -m|-M outputFile accessLogFile
# logconv.pl -m|-M outputFile accessLogFileCopy to Clipboard Copied! Toggle word wrap Toggle overflow