Sun Java System Directory Server Enterprise Edition 6.2 Administration Guide

ProcedureTo Tail Directory Server Logs

You can use the dsadm command to display a specified number of lines of the Directory Server logs, or to display log entries younger than a specified age. This example tails the error log. To tail the access log, use show-access-log instead of show-error-log.

  1. Display error log entries younger than a certain age.


    $ dsadm show-error-log -A duration instance-path
    

    You must specify a unit for the duration. For example, to display error log entries younger than 24 hours, type:


    $ dsadm show-error-log -A 24h /local/ds
  2. Display a specified number of lines from the error log (starting from the end).


    $ dsadm show-error-log -L last-lines instance-path
    

    The number of lines is expressed as an integer. For example, to display the last 100 lines, type:


    $ dsadm show-error-log -L 100 /local/ds

    If you do not specify a value, the default number of lines displayed is 20.