ndsPacketTrace Script


A tool to easily take ndstraces and packet traces.


Sometimes a ndstrace or packet trace or both are needed to troubleshoot a network issue, authentication issue, volume/share access issue, eDirectory sync issue, etc...

If you are unfamiliar with procedures to take a ndstrace or a packet trace it can seem daunting and confusing.

If traces are needed from multiple servers the procedure can be complicated and time consuming just preparing and initiating the traces.

In taking a LDAP/NMAS trace enabling the ldap screen options is usually a step that is overlooked and can result in the trace not containing the information needed, thus initiating the trace a second time.

When troubleshooting issues some time multiple traces are needed and any time saving tools would be of great assistance.


This script will easily allow you to take a variate of ndstraces and packet traces. There are options to take only a packet trace or only a ndstrace or both traces simultaneously.

When troubleshooting Samba shares many times enabling samba debug is necessary. Some time enabling winbind and netbios debug is also necessary. This script can do this for you with out the need to modifying the smb.conf or enabling smbcontrol -d 10 from the command line for each samba, netbios, and winbind pid.

Another feature is the ability to easily e-mail the logs and traces, e-mail a tarball of the traces and logs, or just create a tarball of the traces and logs. The e-mail feature may not work depending if postix is installed (which is installed by default unless otherwise specified) and your environment.

The options in the script can be modified in the script, running in menu mode, or using a switch when executing the script.

To learn more about ndstraces see TIDs 7009602, 7007106, 7001461, and 7009603


Download the script and untar the script with the command:
tar -jxvf ndsPacketTrace.bz2

Copy the script to the ~/bin/ to run the script with out the full path other wise either ./ndsPacketTrace.sh (if in same directory) or enter the full path to the script.


Run the script and the menu will pop up (unless disabled)

ndsPacketTrace Menu Main Menu

Select an option to modify by pressing the correlating number or letter showing in bold.

Example: Press 4 or p to disable packet trace option.

Disabling Packet Trace Options Disabling Packet Trace Options

After changing an option like disabling packet traces, the menu will display the change.

Packet Trace options is now Disabled Packet Trace options is now Disabled

To change the ndstrace filter option, press 2 or f.

Menu to select a different trace filter Menu to select a different trace filter

Notice time, tags, and severity are always enabled. Select a number to change the filter to troubleshoot a specific type of issue. LDAP/NMAS is the most common. Some times for LDAP/NMAS traces additional information is needed. Usually the ldapdbg option gathers that information.

To gather troubleshoot all authentication protocols like ncp, ldap, etc ... try the auth option. If no there is not a change in the setting, press enter to continue. That will take you back to the main menu.

To run the script with the options enabled, in this case ndstrace with common LDAP options enabled for the filter, press 1 or r.

ndstrace is running, press enter to stop the trace ndstrace is running, press enter to stop the trace

Notice the filter options are correctly set for a proper LDAP/NMAS trace. The logging option will be turned on when the trace starts up. At the bottom of the terminal will display the message, Press [Enter] key to end the trace ...

Just as the message says, press enter and the trace will turn off the logging and stop the trace. If the screen option is enabled in the ndsPacketTrace, a prompt to enter admin credentials will appear before the ndstrace begins. Just as the example will show for the admin credentials, use the .x500 syntx example: admin.novell

When the trace if finished, depending on the e-mail setting and tarball setting, something like the following message will appear.

Displays logs and tarball location Displays logs and tarball location

Depending on the options selected for the trace, the logs and tarball file locations will be displayed. If the tarball option is disabled the tarball will not be created.

The tarball makes is simple to send all the logs at once to Novell Support.

Another options is to use the -l switch to list the settings.

ndsPacketTrace -l ndsPacketTrace -l

The -l switch will display the options enabled. At the side are a list of switches to toggle a specific setting.

ndsPacketTrace -l displayed options ndsPacketTrace -l displayed options

If the Packet Trace Setting is now required, enabling it is as simple as running the script with the -p switch

ndsPacketTrace -p ndsPacketTrace -p

Notice, the Packet Trace Setting is now enabled.

Using the switches can be useful when you have the menu disabled, but you need to modify the options.

Don't forget about the help screen. Use the -h switch to display other possibilities you can do with the script.

ndsPacketTrace -h, the help screen ndsPacketTrace -h, the help screen

Notice, there is another set of arguments added to the end of the script to enable or disable an option. Also there is an update option. The update option will download the latest script from DSfWDude.com and preserve most of the settings.

If you know the ldap screen options are enabled you do not want to be bothered setting the options again. You can use the -o switch or simply add off at the end of the script.

ndstrace off, another way to disabling ldap screen options ndstrace off, another way to disabling ldap screen options

Running the script with the menu disabled and no switches starts the running the trace options specified in the script immediately.

If Samba is installed and set to start then the "Samba Debug Setting" option will show as Enabled or Disabled and can be changed just as the other options.

If eDirectory is not installed the ndstrace settings will be marked NA for Not Available.



How To-Best Practice
Comment List
Parents Comment Children
No Data