Compare (n)dstrace on multiple platforms.

(Last modified: 25Apr2006)

This document (10100779) is provided subject to the disclaimer at the end of this document.

symptom

Compare (n)dstrace on multiple platforms.

fact

Novell Open Enterprise Server (OES)

Suse Linux Enterprise Server

Novell NetWare 6.5

Microsoft Windows

Novell eDirectory 8.7.3.x

Novell eDirectory 8.8

cause

The (n)dstrace modules that are used for viewing eDirectory events and troubleshooting issues vary slightly across platforms.  Some simple rules exist to keep those issues in order to provide a simple interface to DSTrace.

fix

To start with a couple exceptions will be noted.  First, the Windows platform has a GUI that can be used to select or deselect filters to be monitored.  For this reason the DSTrace commands do not apply and will not be mentioned for that platform.  A similar interface that is web-based is available for all platforms through iMonitor for those who do not want to use a command line.  iMonitor also provides longer-term storage of the generated log files and a method of saving those files with the HTML formatting (colors included for easier identification of certain events) which may be desirable for many.

On the NetWare platform there are two way to get to trace information.  The first is with the `set` commands.  The second uses the dstrace.nlm module.  The following details will attempt to clarify which commands work with which trace method.  The non-NetWare platforms use a combination of the commands for the `set` and `nlm` methods detailed at this point.

NetWare:
`set`: To clear all filters use the command: `set dstrace=nodebug` from the server console.  To enable all filters use `set dstrace=debug`.  To use individual filters use the syntax `set dstrace=+blink` where 'blink' is the name of the filter.  To disable individual filters use the syntax `set dstrace=-blink`.  To enable tracing type `set dstrace=on` or to disable, `set dstrace=off`.  To trace to a file type `set ttf=on` and to stop use `set ttf=off`.  Clearing that file can be done with `set dstrace=*r`.  The file is written to sys:\system\dstrace.dbg.

`dstrace.nlm`: To enable the tracing simply load dstrace with the command, `dstrace`.  Typing that again at any time will show you a list of filters currently enabled as well as whether or not tracing to the screen or a file is taking place.  To enable a filter type the following command from the system console: `dstrace +blnk`.  This enables the backlink filter.  A list of possible filters is available from the list received when typing `dstrace` from the system console.  To stop tracing completely type `unload dstrace`.  To start or stop tracing to the screen type `dstrace screen on` or `dstrace screen off`.  Tracing to a file is similarly `dstrace file on` or `dstrace file off`.  Both can be set at once with `dstrace on` or `dstrace off`.  The log file generated is sys:\system\dstrace.log.  Enabling all filters can be accomplished with the command `dstrace +all` and disabling with `dstrace -all`.  Multiple commands can be executed on the same line using the syntax `dstrace +blnk +sklk +misc +auth` chaining multiple options together.  Conflicts between two commands are resolved by executing them in the order they are typed.

For either the `set` or `dstrace.nlm` methods the following are the same.  To execute an action (heartbeat, backlink process, etc.) or to disable or enable functionality (schema synchronization, replica synchronization, etc.) use the same syntax of `set dstrace=*h` or `set dstrace=!d` using the correct special character and alphanumeric character(s) to carry out the request.  The filters (on NetWare at least) are case-insensitive.

Linux (and other *nix platforms):
On the other platforms the module in control of tracing is called 'ndstrace'.  It has some other added funcationality because of the nature of the operating systems (loading and unloading of DS modules, for example) but otherwise is similar to 'dstrace.nlm'.  You will notice some commands similar to both the `set` and `dstrace.nlm` commands present in ndstrace.  Where multiple instances of eDirectory 8.8+ are possible you will be prompted to choose the instance to trace.  In the following examples typing `ndstrace` from within the ndstrace utility is synonymous with typing `dstrace` and the two are interchangeable.

To start tracing simply type `ndstrace` and a new screen will open where traces are shown and from where commands are given.  To turn on most filters the command `set dstrace=debug` can be used.  To turn on all filters `set dstrace=all` is available. To turn off all filters either `set dstrace=none` or `set dstrace=nodebug` can be used.  Typing `dstrace` at any time will present a list of filters as well as the status of file or screen logging.  Filters can be enabled or disabled with the syntax `dstrace +blnk` and `dstrace -blnk` similar to dstrace.nlm.  File or screen-based logging can be enabled or disabled with the same `dstrace file on`, `dstrace screen on`, `dstrace file off`, `dstrace screen off` commands you are used to from dstrace.nlm.  Multiple commands can be executed on the same line using the syntax `dstrace +blnk +sklk +misc +auth` chaining multiple options together.  Conflicts between two commands are resolved by executing them in the order they are typed.

The ndstrace.log file is stored by default in the directory specified by the n4u.server.vardir eDirectory variable in eDirectory 8.7.x.  Using the command:
cd `ndsconfig get n4u.server.vardir | awk -F= '{ print $2 }'`
should get you to the correct directory.  In eDirectory 8.8 the ndstrace.log file is stored in that same directory's sibling directory named 'log'.  For example if the vardir variable points to /var/opt/novell/eDirectory/data then ndstrace.log will be in /var/opt/novell/eDirectory/log.  `set dstrace=*r` will also reset the log file on *nix.

On a final note eDirectory on the *nix platforms has another extension for the ndstrace command that is useful.  Using the '-c' parameter commands can be fed directly to ndstrace while it is running in command-line mode ('-l' switch).  In order to send commands to ndstrace it must already be running either in another shell or in the background.  An example of a way to use this functionality is if you are running `ndstrace -l | grep someUser` which would send all output through grep and write it to the screen.  If you decided after some time to enable or disable some filters you could type those commands from the command prompt (if ndstrace was running in the background) or from another prompt on the same box.  The changes would take effect immediately and the trace would continue to run during the entire operation.  The ability to change settings on the fly is not new to eDirectory on any platform but its uses in these cases may not be well known and could be very useful in some cases where live troubleshooting is being used (as opposed to tracing to a file and reviewing that file after the fact).

.

note

To make the ndstrace window show more data you must resize the window (if remotely-accessing ndstrace via SSH, a terminal window or some other protocol) and then (re)load ndstrace.  ndstrace will size to its current window size when it is loaded.

ndstrace can also be loaded with a number of switches including '-l' (lower-case 'L') which will write directly to the screen without opening an ndstrace window.  This output can then be redirected similar to any other program's output.  See the 'man' page or online documentation for more details.

If  command listed is wrapped completely in backticks those should not be included in the command unless explicitly stated that they are required.  On *nix platforms backticks allow you to run a command inline and return the results into the current command and are used to indicate a command to be run.  If backticks appear within a command then they should be included on the command line.

document

Document Title: Compare (n)dstrace on multiple platforms.
Document ID: 10100779
Solution ID: NOVL105500
Creation Date: 26Mar2006
Modified Date: 25Apr2006
Novell Product Class:novell directory services

disclaimer

The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.