DTFormatter

Anonymous
Anonymous

Formats DriverTrace output   

Version
3.4

Requirements
CitectSCADA 5.41+ and .Net 2.0

Description
This utility formats and exports DriverTrace output from the syslog.dat files allowing you to more easily find IO related problems.  Refer to CitectSCADA KnowledgeBase for further information on DriverTrace
The utility is also useful even when no drivertraces are in the syslog as it can document syslog driver error messages.

 

The utility will:

• Place a reply for a request immediately below the request.
i.e. the ← REPLY matched up with the original REQUEST →

• Flag missing replies with ### Reply MISSING

• Mark where DCBs have returned errors with a ### flag.

• Document known error codes with the error message.

• Filter traces by specifying a filter flag

e.g. CTDRV_WRITE in the case sensitive box would result in only CTDRV_WRITE DCBs being in the trace.

Notes:

• Drag & drop features - The light blue fields support drag and drop from your explorer.  Drag the file and drop it into the field and the program will remember its path.

• The level of instrumenting the syslog.dat depends on access to a "proterr.dbf" file (in xx\citectxx\bin) and your projects "units.dbf" file.
Provided proterr.dbf has been updated, custom drivers not distributed by Citect will also be instrumented.

• Tick Box Meanings:
Mark Errors - Places a "###" marker in the file to make it easy to find errors
Error Text - Will place textual descriptions of errors next to an error
Separate requests - Places a blank line between driver requests to make it easier to read the file
Include other lines - Does not filter out other syslog messages besides drivertraces.

• DCB Filters:
Allows results to be filtered based on a match in the "=> xxx" line. e.g. "unit10" would output only traces with "unit10" in them.

• If the trace contains Drivertraces then the utility will extract the Port to Protocol relationship automatically to allow instrumentation of error codes.

• If only normal IO Server syslog messages exist in the log (no drivertraces), then the project Units.dbf can be used to provide this mapping.

• Units.dbf use – You can optionally drag and drop the Units.dbf for the project to provide the mapping between any unreferenced Ports and Protocols. This allows the maximum number of errors to be decoded.

• Ticking “Separate requests” can make reading the traces easier.

• Always try to get the units.dbf, ports.dbf files (or the compiled versions _units.rdb and _ports.rdb files if the DBF is not available) associated with the syslog.dat.

• Special note on “CTDRV_INFO
This trace does not have a return and currently incorrectly gets assigned a missing return marker. This will be fixed in a later version.

• ProtErr.dbf
The system uses proterr.dbf to be able to map a protocol error to an actual text string.  It will use the protdir.dbf under your citect\bin install by default.

• Console Mode.
Just pass the path to the syslog.dat file and it will create the <filepath>.txt output without using the GUI.

E.g. dtformatter c:\windows\syslog.dat

will produce a file c:\windows\syslog.dat.txt with items instrumented.

• You may need a local copy of the utility due to .NET permission issues (a crash with reference to a “security exception” is a dead giveaway). We suggest in your \windows area.

• It is not recommended that DTFormatter be used on very large syslog.dat files (20Mb +) as it places every line into memory

Output sample:

-> 0dcd0d53 37.250 Cmd: 02 CTDRV_INIT_CHANNEL,MODNET, Port: pumphouse_2, Unit: N/A
 <+0dcd0d53 52.250 Cmd: 02 CTDRV_INIT_CHANNEL ### ErrDriver 20 (0x14) and took 15001ms
### Drivertrace: Protocol MODNET, Port: pumphouse_2, Unit: N/A Error 20 - "Channel is offline"

=> 0be02dcc 39.750 Cmd: 04 CTDRV_READ        ,DISKDRV, Port: DISKDRV, Unit: unit10
 | 0be02dcc 39.750 UnitType: 1 (0x1), UnitAddr: 2820 (0xb04), BitWidth: 16, UnitCount: 22, RawType: REAL  
 <+0be02dcc 39.750 Cmd: 04 CTDRV_READ         ErrDriver 0 (0x0) and took 0ms
 <+0be02dcc 39.750 UnitType: 1 (0x1), UnitAddr: 2820 (0xb04), BitWidth: 16, UnitCount: 22, RawType: REAL  
 <+0be02dcc 39.750 000:  5.000000E+004  1.000000E+004  5.000000E+004  0.000000E+000
 <+0be02dcc 39.750 004:  3.340000E+004  0.000000E+000  0.000000E+000  0.000000E+000
 <+0be02dcc 39.750 008:  3.340000E+004  1.000000E+002  4.000000E+001
=> 0c20a694 40.000 Cmd: 04 CTDRV_READ        ,MODNET, Port: pumphouse_1, Unit: pumphouse_1
 | 0c20a694 40.000 UnitType: 3 (0x3), UnitAddr: 0 (0x0), BitWidth: 16, UnitCount: 6, RawType: INTEGER
 <+0c20a694 46.031 Cmd: 04 CTDRV_READ         ### ErrDriver 21 (0x15) and took 6028ms
### Drivertrace: Protocol MODNET, Port: pumphouse_1, Unit: pumphouse_1 Error 21 - "No response from device"
 <+0c20a694 46.031 UnitType: 3 (0x3), UnitAddr: 0 (0x0), BitWidth: 16, UnitCount: 6, RawType: INTEGER
 <+0c20a694 46.031 000:      0      0      0      0      0      0

Author 
greg.roberts@citect.com

Submitter
Geoff Leach

Attachments