Debug Trace

1. Introduction

This document describes how to control and show trace output from VelocityDRIVE-SP.

2. The Tool

The MUP1 client tool 'mup1ct' is used to control trace.

The command below is used to show the help. The output only shows the help for the 'sysrq trace' and 'listen' commands.

$ mup1ct -h
  mup1ct [options] sysrq trace <TRACE-SPECIFIER>[,<TRACE-SPECIFIER>...]
    This is used to set a trace level, where <TRACE-SPECIFIER> is defined as:
      <MODULE>:<LEVEL>

      Where:
        <MODULE>: Is the name of a given module. An "empty string" may be used as an alias
                  for all modules.
        <LEVEL>:  Can be specified as one of: 'off', 'error', 'info', 'debug',
                  'noise', 'get'.
                  Here 'get' is special as it will trigger the given trace level
                  to be printed as a MUP1-Trace message.
                  All other will cause an update of the trace level.
                  Default value is 'get'
    If multiple trace-specifier are given, then they will be evaluated in
    sequence.

    Example:
      mup1ct -t sysrq trace : # Print all trace levels
      mup1ct -t sysrq trace :off # Disable all traces
      mup1ct -t sysrq trace port:info # Set trace level in 'port' to info level

  mup1ct [options] listen
    This command will not issue any requests, but simply listen to the UART line
    and if used in combination with '-t' then it shall print traces.
    Notice the default "waiting" ('-w') time here is infinite.

3. Port Polling Trace

The 'sysrq trace' command can be used to show and enable debug trace for the port module:

$ mup1ct -d termhub://10.205.27.92:4113 -t sysrq trace port
Module   Level
-------- --------
    port error

$ mup1ct -d termhub://10.205.27.92:4113 -t sysrq trace port:debug

The 'listen' command can be used to show trace output, for example for one second using '-w' option:

$ mup1ct -d termhub://10.205.27.92:4113 -t -w 1 listen

00:07:24-097202 port/debug 764 : enter  port 6  link_old 0  link 0  link_down 0
00:07:24-131201 port/debug 764 : enter  port 7  link_old 0  link 0  link_down 0
00:07:24-165202 port/debug 764 : enter  port 8  link_old 0  link 0  link_down 0
00:07:24-199202 port/debug 764 : enter  port 9  link_old 0  link 0  link_down 0
00:07:24-233203 port/debug 764 : enter  port 10  link_old 0  link 0  link_down 0
00:07:24-267203 port/debug 764 : enter  port 11  link_old 0  link 0  link_down 0
00:07:24-301203 port/debug 764 : enter  port 12  link_old 0  link 0  link_down 0
00:07:24-335203 port/debug 764 : enter  port 13  link_old 0  link 0  link_down 0
00:07:24-369203 port/debug 764 : enter  port 14  link_old 0  link 0  link_down 0
00:07:24-403203 port/debug 764 : enter  port 15  link_old 0  link 0  link_down 0
00:07:24-437203 port/debug 764 : enter  port 16  link_old 0  link 0  link_down 0
00:07:24-471204 port/debug 764 : enter  port 17  link_old 0  link 0  link_down 0
00:07:24-505203 port/debug 764 : enter  port 18  link_old 0  link 0  link_down 0
00:07:24-539204 port/debug 764 : enter  port 19  link_old 0  link 0  link_down 0
00:07:24-573204 port/debug 764 : enter  port 20  link_old 0  link 0  link_down 0
00:07:24-607204 port/debug 764 : enter  port 21  link_old 0  link 0  link_down 0
00:07:24-641204 port/debug 764 : enter  port 22  link_old 0  link 0  link_down 0
00:07:24-675205 port/debug 764 : enter  port 23  link_old 0  link 0  link_down 0
00:07:24-709144 port/debug 764 : enter  port 24  link_old 1  link 1  link_down 0
00:07:24-743143 port/debug 764 : enter  port 25  link_old 1  link 1  link_down 0
00:07:24-777144 port/debug 764 : enter  port 26  link_old 0  link 0  link_down 1
00:07:24-811145 port/debug 764 : enter  port 27  link_old 0  link 0  link_down 1
00:07:24-845206 port/debug 764 : enter  port 28  link_old 1  link 1  link_down 0
00:07:24-879255 port/debug 764 : enter  port 0  link_old 1  link 1  link_down 0
00:07:24-913255 port/debug 764 : enter  port 1  link_old 1  link 1  link_down 0
00:07:24-947256 port/debug 764 : enter  port 2  link_old 1  link 1  link_down 0
00:07:24-981256 port/debug 764 : enter  port 3  link_old 1  link 1  link_down 0
00:07:25-015205 port/debug 764 : enter  port 4  link_old 0  link 0  link_down 0
00:07:25-049205 port/debug 764 : enter  port 5  link_old 0  link 0  link_down 0
End of listen