How to debug NetWorker without stopping processes/services
With the release of networker 7.4.4 we now have the ability to debug NetWorker daemons on the fly using the dbgcommand without restarting NetWorker. This utility can be used to gather information against a selected process.
You need to run this from the cmd line or terminal session.
dbgcommand -p <PID> [Debug=<level> | command]
- <PID> is the process id of the NetWorker process you want to debug
- where <level> is the desired debug level.
- where <command> is the desired command you want to run debug against
- Debug levels 0 to 99 are supported
- Debug level 0 is turning off debugging
Here is an example of running the command against process id 32768 and setting the debug level to 5:
# dbgcommand -p 32768 Debug=5
Here is an example of running the command against process id 32772 and setting the debug level to 9:
# dbgcommand -p 32772 nsrck
All debugging output is visible in the daemon.log (raw) file.
When you adjust a processes debug level, it gets logged in the appropriate daemon log, for example:
0 1242123096 2 0 0 3051682432 32759 0 schlumpf nsrd 2 %s 1 0 54 Changing Debug level of process (id 32768) from 0 to 5 0 1242123324 2 0 0 3051682432 32759 0 schlumpf nsrd 2 %s 1 0 54 Changing Debug level of process (id 32768) from 5 to 0
0 1242123424 2 0 0 3051682432 32759 0 schlumpf nsrd 2 %s 1 0 56 Changing nsrck of process (id 32772) from 0 to 1
The dbgcommand can be run against almost any NetWorker process id or command, with the exception of the nsrjb.