6.17. DEBUG commands

Debug commands show advanced diagnostic about Abilis CPX system and resources. These types of commands need administrator or super user rights.

[Note]Note

Shown information is strictly technical and meaningless to the user; Abilis CPX technicians could need it for detecting and solving eventual problems.

By typing the following command, it's possible to display the syntax.

[13:54:30] ABILIS_CPX:debug ?

BM             Display Boot Manager configuration file
CPXRUN         Display CPX Run configuration file
CTIVO          Display information on CTIVO service
DIAGTEST       Display information on Diagnostics test performances
ETHMAC         Display factory MAC addresses of PCI Ethernet cards
FILE           File system information and statistics
HOOK           Task hook information
IRQ            Interrupts information and statistics
MEM            Memory information and statistics
MAILFILTER     Display information on Mail Filtering service
PCIDEV         Display PCI service debug information
PO:            CPX port number [0..999]
RES:           Resource identifier 'type-n', where 'n' can be [1..999]
RND            Random number generator service
SIMULATE       Simulate an event for debugging purposes
TASK           Tasks information and statistics
USBDEV         Display USB service debug information
WDGMEM         Watchdog memory

For example, DEBUG FILE CONF command displays the internal file system driver configuration.

[17:48:27] ABILIS_CPX:debug file conf

RTF configuration:

- Maximum number of physical disks: 32
- Maximum number of drives:         25
- Maximum number of files:          135
- Maximum number of buffers:        256
- Sector buffer size:               4096

6.17.1. DEBUG MEM

This command shows debugging information about the memory. By typing the following command, it's possible to display the syntax.

[13:23:59] ABILIS_CPX:debug mem ?

DEBUG MEM [opt]|[START:val LEN:val]  Display Memory information and statistics

Options/parameters:

-C         Display Memory information and statistics and executes a
           check/validation of the heap
-D         Display Heap allocated at drivers start-up driver by driver
-E820      Display e820 BIOS-provided physical RAM map
-H         Display Heap content
-V         Display Virtual to Physical memory mapping
START:     Memory block start address (HEX value) [00100000..FFFFFFFF]
                                            <Mandatory when LEN: is specified>
LEN:       Memory block length [1..4294967295]
                                          <Mandatory when START: is specified>

The e820 memory map table can be inspected with the following command.

[13:36:50] ABILIS_CPX:debug mem -e820

e820: physical RAM map provided by Boot Manager:
----------------+----------------+----------
   Start Address|     End Address|      Type
----------------+----------------+----------
0000000000000000|000000000009EBFF|    usable
000000000009EC00|000000000009FFFF|  reserved
00000000000E0000|00000000000FFFFF|  reserved
0000000000100000|000000001FFFFFFF|    usable
0000000020000000|00000000201FFFFF|  reserved
0000000020200000|000000003846DFFF|    usable
000000003846E000|0000000038711FFF|  reserved
0000000038712000|000000003871DFFF| ACPI data
000000003871E000|0000000038789FFF|  reserved
000000003878A000|000000003878FFFF| ACPI data
0000000038790000|0000000038813FFF|    usable
0000000038814000|00000000388ACFFF|  ACPI NVS
00000000388AD000|0000000039609FFF|  reserved
000000003960A000|000000003960AFFF|    usable
000000003960B000|000000003964DFFF|  ACPI NVS
000000003964E000|0000000039DB1FFF|    usable
0000000039DB2000|0000000039FDFFFF|  reserved
0000000039FE0000|0000000039FFFFFF|    usable
0000000100000000|00000001005FFFFF|    usable
000000003A800000|000000003E9FFFFF|  reserved
00000000F8000000|00000000FBFFFFFF|  reserved
00000000FEC00000|00000000FEC00FFF|  reserved
00000000FED00000|00000000FED03FFF|  reserved
00000000FED1C000|00000000FED1FFFF|  reserved
00000000FEE00000|00000000FEE00FFF|  reserved
00000000FF000000|00000000FFFFFFFF|  reserved
----------------+----------------+----------

6.17.2. DEBUG RES

This command shows debugging information about the specified resource. By typing the following command, it's possible to display the command syntax.

[13:54:40] ABILIS_CPX:debug res: ?

DEBUG RES:A [par:val]              Display debug information of all resource(s)
DEBUG RES:type [par:val]           Display debug information of all resource(s)
                                   of the specified type.
DEBUG RES:type-n[,...] [par:val]   Display debug information of the specified
                                   resource(s)

Additional parameters:

LAYER:     Select resource lower layer [L2, LINK, IP, IPT, PPP, PPPOE]
           Mandatory for IP and PV resources, otherwise optional.
                                                  <Only if PROT: not specified>
PROT:      Select protocol layer [LAPB, MLM, ML, PLINKE, PPP, POECLI]
           Mandatory for IP and PV resources, otherwise optional.
                                                 <Only if LAYER: not specified>
SIZE:      Select debug buffer size [7..63 Kibyte].
           By default 63 Kibyte.                                     <Optional>
LSN:       Lsn value [0..65534(dec) or 0000..0FFFE(hex), A]          <Optional>
CMD:       Command string. Spaces require double quotes
           (e.g. CMD:"str1 str2 ...")                                <Optional>

Data are stored in a 6 KB size buffer. Depending on the resource type, where the command is executed on, this buffer could not be enough and at the end of the visualization the following message will be displayed “INCOMPLETE INFORMATION: BUFFER SIZE TOO SHORT”. By using the option SIZE, the user can eventually increase the maximum buffer size used by the command. The indicated value (in KB) must be in the interval [7 - 63].

By using the options LSN and CMD it's possible to select the type of debugging information to be displayed.

For example, to show debugging information of an ADSL line, type the command debug res:ip-xx prot:ppp, where xx is the number of the IP resource associated with the ADSL line. With the options LSN, it's possible to select the type of debugging information to be displayed; if it's set to 0, it will be displayed the command help.

[13:54:49] ABILIS_CPX:debug res:ip-5 prot:ppp

RES:Ip-5 - IP over PPP (PPP) -------------------------------------------------
       ADSL-xx.xxx.xxx.xxx/32
       BufferLength:64512  Date/Time:22/08/2017 09:04:30 TraceTime:81833988

Usage:
   LSN:0          == This help
   LSN:1          == Complete debug
   LSN:2          == Upper/Lower NCB status
   LSN:3          == Layer states
   LSN:4          == Link status
   LSN:5          == Negotiated options
   LSN:6          == Echo information
   LSN:7          == RADIUS information
   LSN:8          == MSS-CLAMP statistics
   LSN:9          == Display Echo round-trip delay
   LSN:9  CMD:CLR == Clear Echo round-trip delay
   LSN:9  CMD:EXT == Extended display Echo round-trip delay
   LSN:10         == Show CALL log
   LSN:10 CMD:CLR == Clear CALL log
   LSN:11         == Show PPP Negotiation log
   LSN:11 CMD:CLR == Clear PPP Negotiation log
[13:54:54] ABILIS_CPX:debug res:ip-5 prot:ppp lsn:10

RES:Ip-5 - IP over PPP (PPP) -------------------------------------------------
       ADSL-xx.xxx.xxx.xxx/32
       BufferLength:64512  Date/Time:22/08/2017 09:06:06 TraceTime:917786760

11/08/17 18:09:54  *********************
11/08/17 18:09:54  * * * * START * * * *
11/08/17 18:09:54  Calling SLink
11/08/17 18:09:54  Calling SLink - succeeded
21/08/17 11:51:52  Hanging up with cause 0x00-0x00
21/08/17 11:51:52  Hanging up - succeeded with cause 0x00-0x00
21/08/17 11:51:53  *********************
21/08/17 11:51:53  * * * * START * * * *
21/08/17 11:51:53  Calling SLink
21/08/17 11:51:53  Calling SLink - succeeded

6.17.3. DEBUG SIMULATE EVENT

The command DEBUG SIMULATE EVENT:val simulates an event for debugging purposes. Use the following command to show all possible events:

[13:58:50] ABILIS_CPX:debug simulate event: ?

DEBUG SIMULATE EVENT:val [opt:val]     Simulate an event for debugging purposes

Possible events:

XCP [CPU:val]  Structured exception on the specified CPU [MAIN or EXTRA].
               The CPU specification is optional. By default the exception
               is simulated on the Main CPU (corresponding to CPU:MAIN).
WDL            WDLIVE1 event. It executes a never ending thread loop with
               IRQ MONITOR RESTART disabled.
LOOP [msec]    It executes a thread loop without task switching for the
               specified interval [1..2000 ms].
               If 'msec' is omitted the loop is without time limit.
IRQLOOP        Requires at least one ETH resource running and
               'MULTI-CPU' mode DISABLED.
               It forces the interrupt generation while serving is disabled.
               This condition causes an IRQ LOOP which has to be solved by
               IRQ MONITOR.
WDGRESET       WDG Reset. It resets WDG but doesn't make SW reset of the PC.
               If the WDG reset has no effect, after 15 sec a SW reboot
               is executed.
SWRESET        Software only reset
BLOCKAGE [msec]  Complete lock. It disables ALL the interrupts and executes
               a loop without task switching for the specified time
               interval [1..2000 ms].
               If 'msec' is omitted the loop is without time limit.
TSAVE          Automatic TRACE saving request (trace stop-save-start)
QUIT           Quit exception
TASKOVR        Tasks overflow, i.e. too many threads
HOVR           Heap overflow (bad allocation exception

6.17.3.1. DEBUG SIMULATE EVENT:XCP

This command simulates the structured exception:

[13:58:58] ABILIS_CPX:debug simulate event:xcp

YOU ASKED TO SIMULATE THE 'STRUCTURED EXCEPTION' EVENT.
THIS WILL CAUSE THE SYSTEM TO BE RESTARTED, PROCEED ANYWAY (N/Y)?y

PROCEEDING WITH STRUCTURED EXCEPTION EVENT SIMULATION...

The log shows the following information:

...
22/08/2017 09:07:52 [00221] I: DEBUG SIMULATE EXCEPTION ON MAIN CPU
22/08/2017 09:07:53 [00029] E: P01
22/08/2017 09:08:01 [00032] AUTO WARM START
22/08/2017 09:08:16 [00103] -------------------- NEW RUN --------------------
...

6.17.3.2. DEBUG SIMULATE EVENT:WDL

This command simulates the WDLIVE1 event:

[14:03:16] ABILIS_CPX:debug simulate event:wdl

YOU ASKED TO SIMULATE THE 'WDLIVE1' EVENT.
THIS WILL CAUSE THE SYSTEM TO BE RESTARTED, PROCEED ANYWAY (N/Y)?y

PROCEEDING WITH WDLIVE1 EVENT SIMULATION...

The log shows the following information:

...
22/08/2017 14:04:01 [00222] I: DEBUG SIMULATE WDLIVE-1
22/08/2017 14:04:38 [00103] -------------------- NEW RUN --------------------
...

6.17.3.3. DEBUG SIMULATE EVENT:WDGRESET

This command resets WDG but doesn't make Abilis SW reset. It's useful to verify if the watchdog (MFIDE/MFPCI/MFLPC) is really able to make a HW reset of the Abilis CPX, and thus if the reset cable is properly connected.

[14:03:16] ABILIS_CPX:debug simulate event:wdgreset

YOU ASKED TO SIMULATE THE 'WDG RESET' EVENT.
THIS WILL CAUSE THE SYSTEM TO BE RESTARTED, PROCEED ANYWAY (N/Y)?y

PROCEEDING WITH WDG RESET EVENT SIMULATION...

The log shows the following information after using this command:

[14:10:52] ABILIS_CPX:d l

Current Local Time: Tuesday 22/08/2017 09:13:56 (UTC+2.00)

...
22/08/2017 14:09:42 [00394] I: DEBUG SIMULATE WDG RESET
22/08/2017 14:09:53 [00103] -------------------- NEW RUN --------------------
...

If the reset does not take place, the only way to restart Abilis is using the warm start command:

[14:09:59] ABILIS_CPX:debug simulate event:wdgreset

YOU ASKED TO SIMULATE THE 'WDG RESET' EVENT.
THIS WILL CAUSE THE SYSTEM TO BE RESTARTED, PROCEED ANYWAY (N/Y)?y

PROCEEDING WITH WDG RESET EVENT SIMULATION...

WARNING: WDG RESET HAD NOT EFFECT.

******************************************************************************
ATTENTION!
THE SYSTEM MUST BE RESTARTED WITH 'WARM START' COMMAND.
ALLOWED COMMANDs: 'CLOSE', 'EXIT', 'WARM START'.
******************************************************************************

6.17.3.4. DEBUG SIMULATE EVENT:BLOCKAGE

This command simulates the system blockage event:

[14:15:09] ABILIS_CPX:debug simulate event:blockage

YOU ASKED TO SIMULATE THE 'SYSTEM BLOCKAGE' EVENT.
THIS WILL CAUSE THE SYSTEM TO BE RESTARTED, PROCEED ANYWAY (N/Y)?y

PROCEEDING WITH SYSTEM BLOCKAGE EVENT SIMULATION...

The log shows the following information:

...
22/08/2017 14:15:25 [00365] I: DEBUG SIMULATE BLOCKAGE
22/08/2017 14:16:02 [00103] -------------------- NEW RUN --------------------
...

6.17.3.5. DEBUG SIMULATE EVENT:TSAVE

This command simulates the trace autosave event (trace start-stop-save):

[14:18:25] ABILIS_CPX:debug simulate event:tsave

YOU ASKED TO SIMULATE THE 'TRACE AUTO SAVE' EVENT.
THIS WILL ACTIVATE CURRENT TRACE AUTOMATIC SAVING (WITHIN 2 min.),
PROCEED (N/Y)?y

PROCEEDING WITH TRACE AUTO SAVE EVENT SIMULATION...

COMMAND EXECUTED

The log shows the following information:

...
22/08/2017 14:18:25 [00284] I: DEBUG SIMULATE TRACE AUTO SAVE
22/08/2017 14:20:25 [00275] I: TRACE AUTO SAVE: STARTED (TOUT)
22/08/2017 14:20:25 [00279] I: TRACE AUTO SAVE: TRACE STOPPED
22/08/2017 14:20:25 [00280] I: TRACE AUTO SAVE: TRACE SAVED
...

6.17.3.6. DEBUG SIMULATE EVENT:HOPV

This command simulates the heap overflow event:

[14:22:01] ABILIS_CPX:debug simulate event:hovr

YOU ASKED TO SIMULATE THE 'HEAP OVERFLOW' EVENT.
THIS WILL CAUSE THE SYSTEM TO BE RESTARTED, PROCEED ANYWAY (N/Y)?y

PROCEEDING WITH HEAP OVERFLOW EVENT SIMULATION...

The log shows the following information:

...
22/08/2017 14:22:22 [00079] I: DEBUG SIMULATE HEAP OVERFLOW
22/08/2017 14:22:23 [00030] E: P02
22/08/2017 14:22:23 [00135] MEMORY SUMMARY:
22/08/2017 14:22:23 [00136]  TOT:    260,046,848
22/08/2017 14:22:23 [00137]  FREE:   123,811,664
22/08/2017 14:22:23 [00452]  HF:     123,811,664
22/08/2017 14:22:23 [00138]  HU:     114,979,568
22/08/2017 14:22:23 [00139]  HLFB:   123,811,664
22/08/2017 14:22:23 [00140]  HLUB:     8,388,608
22/08/2017 14:22:23 [00032] AUTO WARM START
22/08/2017 14:22:34 [00103] -------------------- NEW RUN --------------------
...