DXSpider Tracing Debug Entries: Difference between revisions

From DXSpider Documentation Wiki
Jump to navigation Jump to search
WI3W (talk | contribs)
m Fix debug levels link
WI3W (talk | contribs)
m General editing to get ready for publish.
Line 1: Line 1:
==General Information==
==General Information==


DXspider has the ability to log information at various levels, and those levels are set using the [[DXSpider Debug Commands and Levels|debug]] tool in conjunction with the [[DXSpider Debug Commands and Levels#Levels|debug levels]]. Whilst this information is capture in data files in ../spider/local_data/debug/ it can also be seen in realtime from the command line prompt. Once the debug level is set the watchdbg tool can be used from ../spider/perl/ to watch the cluster's full data stream. This can be a very busy stream but it can be filtered for easier scrutiny.
DXSpider has the ability to log information at various levels, and those levels are set using the [[DXSpider Debug Commands and Levels|debug]] tool in conjunction with the [[DXSpider Debug Commands and Levels#Levels|debug levels]]. Whilst this information is captured in the data files of ../spider/local_data/debug/ it can also be seen in realtime from the command line prompt. Once the debug levels are set the 'watchdbg' tool can be used from ../spider/perl/ to watch the cluster's full data stream. This can be a very busy stream but it can be filtered for easier scrutiny.
 
This guide assumes that 'watchdbg' has been linked to /usr/local/bin. If not, you can run this command in Linux:
  sudo ln -s /spider/perl/*dbg /usr/local/bin
This will command will link all dbg subroutines in /spider/perl to /usr/local/bin so they can be accessed from the user prompt like any other built in command.


===Filtering traces===
===Filtering traces===
Line 9: Line 13:
  '<- I' or ' I '
  '<- I' or ' I '


  '<- D' or ' D '
  '-> D' or ' D '


====Trace examples====
====Trace examples====


To watch all outbound spots from this node.
To watch all outbound spots from this node:
  ./watchdbg ' D ' 'PC[16]1'
  watchdbg ' D ' 'PC[16]1'
or just
or to watch everything outbound:
  ./watchdbg '\-> D'
  watchdbg '\-> D' or watchdbg ' D '
 
The same can be done for inbound traffic:
====Saving to a file====
watchdbg '<\- I' or watchdbg ' I '
or two watch all inbound PC92 frames:
watchdbg ' I ' 'PC92'
Note: the hyphen needs to be escaped with the " \ " character. The spaces between ' D ' are important, make sure they are included.


==== Saving to a file ====
The debug files will save these traces, and those files can then be searched. But it is possible to save the traces to a specific file by using pipe | to push them to a file.
The debug files will save these traces, and those files can then be searched. But it is possible to save the traces to a specific file by using pipe | to push them to a file.
  ./watchdbg ' D ' 'PC[16]1' | grep <thing to search for> | trace.txt
  ./watchdbg ' D ' 'PC[16]1' | grep <thing to search for> | trace.txt ----> This still needs to be worked on.

Revision as of 18:29, 5 April 2025

General Information

DXSpider has the ability to log information at various levels, and those levels are set using the debug tool in conjunction with the debug levels. Whilst this information is captured in the data files of ../spider/local_data/debug/ it can also be seen in realtime from the command line prompt. Once the debug levels are set the 'watchdbg' tool can be used from ../spider/perl/ to watch the cluster's full data stream. This can be a very busy stream but it can be filtered for easier scrutiny.

This guide assumes that 'watchdbg' has been linked to /usr/local/bin. If not, you can run this command in Linux:

 sudo ln -s /spider/perl/*dbg /usr/local/bin

This will command will link all dbg subroutines in /spider/perl to /usr/local/bin so they can be accessed from the user prompt like any other built in command.

Filtering traces

To trace incoming messages the I is used, and for outbound the D is used:

'<- I' or ' I '
'-> D' or ' D '

Trace examples

To watch all outbound spots from this node:

watchdbg ' D ' 'PC[16]1'

or to watch everything outbound:

watchdbg '\-> D' or watchdbg ' D '

The same can be done for inbound traffic:

watchdbg '<\- I' or watchdbg ' I '

or two watch all inbound PC92 frames:

watchdbg ' I ' 'PC92'

Note: the hyphen needs to be escaped with the " \ " character. The spaces between ' D ' are important, make sure they are included.

Saving to a file

The debug files will save these traces, and those files can then be searched. But it is possible to save the traces to a specific file by using pipe | to push them to a file.

./watchdbg ' D ' 'PC[16]1' | grep <thing to search for> | trace.txt  ----> This still needs to be worked on.