20.2. Displaying Log Files

You can display the Directory Server log files using the command line and Directory Server Console.

20.2.1. Displaying Log Files Using the Command Line

To display the log files using the command line, use the utilities included in Red Hat Enterprise Linux, such as less, more, and cat. For example:
# less /var/log/dirsrv/slapd-instance_name/access
To display the locations of log files:
# ldapsearch -D "cn=Directory Manager" -W -p 389 \
     -h server.example.com -x -b "cn=config" -s base \
     nsslapd-accesslog nsslapd-errorlog nsslapd-auditlog nsslapd-auditfaillog
...
nsslapd-accesslog: /var/log/dirsrv/slapd-instance_name/access
nsslapd-errorlog: /var/log/dirsrv/slapd-instance_name/errors
nsslapd-auditlog: /var/log/dirsrv/slapd-instance_name/audit
nsslapd-auditfaillog: /var/log/dirsrv/slapd-instance_name/audit-failure

Note

If logging for a log type is not enabled, the corresponding log file does not exist.

20.2.2. Displaying Log Files Using the Console

To display the Directory Server log files:
  1. Open the Directory Server Console. For details, see Section 1.3.1, “Opening the Directory Server Console”.
  2. Select the Status tab.
  3. Expand the Logs entry and select the log you want to display.

    Note

    The Console does not contain a log file viewer for the Audit Fail log. Alternatively, you can:
  4. Optionally, you can apply the following settings to the log file viewer:
    • Set the number of line to display in the Lines to show field.
    • Set a filter in the Show only lines containing field.
    • Display older log files of the same type, by selecting the log in the Select log field.
    • Enable automatically displaying new log entries by selecting Continuous refresh.
    Click the Refresh button to apply the changes.