The Care and Feeding of ISDN4BSD
previous up next
8 The isdndebug Utility 8 The isdndebug Utility 8.2 Getting Statistics

8.1 Setting the debug levels

To be able to set the debug levels, the i4b kernel part must have been compiled with DO_I4B_DEBUG set to true - this is currently the default case (see the beginning of i4b_debug.h).

By using the -l switch, you are able to specify the layer (1...4) and in conjunction with that you can display the current debug flags (-g) or set a new debug flag value (-s value).

For example, the command isdndebug -l1 -g shows the value of the debug flag for the layer 1 of the passive card ISDN stack, the first line shows:

Layer 1: 0000.0000.0000.0000.1000.1010.0010.1001 = 0x8A29

After the label ``Layer 1:`` the binary representation of the debug flags is printed as ``1''s and ``0''s and the same value as a hex value. The lines following this are just explanations what type of debug output is switched by the binary representations (this is almost only of value to you if you have access to the sources or are asked by a developer to send some output).

No to change the the debug flags, for example switch off the general error messages (which is not such a good idea at all!), you thake the hex value 0x8A29, modify it to clear the flag for the general error messages (0x8A28) and execute isdndebug -l1 -s 0x8a28 and from now on (until the next reboot) you won't get any general error messages from layer 1 anymore.

Please keep in mind, that there are many time-critical routines in the i4b kernel stack and enabling too much debugging output wil modify the results you will get because the printf-routines used to print output to the console can consume so much time that the ISDN stack will not work as expected anymore - especially if you are using a serial console running at 9600 baud.

previous index next

Hellmuth Michaelis 2001-08-16