How to configure ndstrace for file rotation

  • 7010885
  • 08-Oct-2012
  • 08-Oct-2012


Novell eDirectory 8.8.6 for Linux and later


In older versions of eDirectory it was not possible to rotate the trace files that ndstrace uses. There were also problems when trying to use tail -F to examine the last lines of trace that were written.
Starting with eDirectory, it is possible to configure ndstrace to rotate trace files.


The rolling mechanism has been implemented in such a way that the most recent rolling file will always be ndstrace.log. When rolling happens all the files are renamed by adding one to the number in their name and then ndstrace.log is renamed to ndstrace1.log, ndstrace.log will be re-created.

The default number of rolling files has been set to one and a configurable option is provided for the number of rolling files. To change the number of rolling files the following command has to be used from ndstrace client side:
set ndstrace=*FL<number>

For ex: set ndstrace=*FL5 will set the number of rolling files to five. The maximum value for the number of rolling files has been set to ten.

By setting the default number of rolling files to one, this feature is effectively disabled until it's configured.

To configure the maximum size of each individual file, you can use the command

ndstrace FMAX=xxxx

where the file size is specified in bytes. Please note that this is the file size of each individual file that will be kept by the file rotation, so the actual space used up in disk will be FMAX times the amount of files kept by the file rotation mechanism.

Additional Information

Notice that since ndstrace.log gets recreated when the maximum size is reached, tail -f will fail when that limit is reached. To be able to tail its contents, it's necessary to use the parameter -F (uppercase F), which will retry on error.