Latest News

Performance Improvements at Point Of Sale - A Guide to Getting the most out of your 4690 System.

It is clear that many of the IBM 4690 POS applications could use an overhaul. But who has the time? And where would one start?

Learn more.

KB00115 Terminal Services/Terminal Concentrator Debug Tracing PDF E-mail

This article provides an overview of the debug tracing features of Terminal Services and Terminal Concentrator.  Normally, trace files are generated for use by QVS for analysis but they can also be useful for integrators and end-users.

The information in this article applies to:

  • All versions of Terminal Services
  • All versions of Terminal Concentrator

MORE INFORMATION

How to turn on binary tracing to disk

  • For TC, tracing can be turned on by creating a LOGGING.ON file in the TC install directory.  For Windows TC, this is typically \TC_NT.  For 4690 TC, this is \TC46.
  • Both TS and TC can be started at a command prompt using 'tprocess -t'.  When starting at the command prompt, it is usually best to erase the contents of the TS or TC log directory (e.g. \TSNT\LOG) before starting.
  • Another version is 'tprocess -tx' which doesn't start tracing until after the application load is complete.
  • For those environments using the CDI configuration file, the keyword traceCmdLine="" can be used to enable binary tracing for both TS and TC, using the -t or the -tx values.
  • After the trace data is collected, TC and TS can be shutdown using 'tprocess -k' or 'tprocess -k1'.  The -k1 option also forces a .PAN file to be generated and is the recommended way of shutting down a system when collecting data for analysis.
  • More information on problem data collection is available in the user manuals.

What is traced?

  • Application calls to the operating system.  4690 applications make calls such as open, read, write, get, set, close to what they think is the 4690 operating system.  4690 itself is an extended version of an operating system named FlexOS developed by Digital Research.  Historically, many 4690 developers have had access to the FlexOS operating system application developers kit.
  • Internal TS/TC subroutine debug tracing.

How tracing works

  • Traces are kept on a per-process basis.  In a normal or live store environment, tracing is done to wrapping, in-memory trace buffers.
  • The traced data is in a binary format to save space and to minimize execution path.  Along with the per-process binary information, a system-wide strings table is kept.
  • When tracing to disk is enabled, the binary data is flushed to disk when the in-memory trace buffer gets full.  The data is saved to TSFn.BIN and TSFn.BI1 files where 'n' is the process sequence number.

How to format trace data

  • The binary log files are formatted into ASCII text files by running the e46dumpf program.  Generally, the formatter is run against the entire contents of the LOG directory.  The ASCII files are named TSFn.BLG, TSFn.BL1, TSFn.BL2, etc.  with TSFn.BLG containing the most recent data.
  • If 'tprocess -k1' was used to shutdown the system, there will also be a SYSTEM.PAN file (binary) and SYSTEMT.OUT file (formatted ASCII).  One of the things in SYSTEMT.OUT will be a list of active processes at the time of shutdown.  This list also indicates the sequential process number for each process.

Getting trace information from a .PAN file

  • The per-process, in-memory, binary trace buffers and strings table are both included in .PAN files.  The formatter finds and formats these buffers into TSFn.PLG files.

Example formatted trace file:



Tips for understanding trace file information

  • FlexOS SVC calls are in the form f_open , f_close, etc.  A '>' symbol indicates entry.  '<' indicates exit from the function.
  • Each timestamp provides millisecond granularity
  • The formatter puts filename annotations to the right of many log lines.  When the filename is preceded by a 'f', it means the line contains a filenum for that file.  When the filename is preceded by a 'b', it means there is a buffer associated with that log line.
  • The editor we all use at QVS is something called KEDIT.  KEDIT has an extremely powerful 'selective line editing' facility that lets us find useful information in these logs and exclude extraneous information.  For example, the KEDIT command all /adxserv causes kedit to remove all lines from view that do not include the text "adxserv."  Furthermore, KEDIT allows its all targets to be expressions such as all /f_open*</ | /badxpia/.  This example will find lines containing 'f_open' followed by '<' (with anything in-between) OR lines containing 'badxpia' and show only those lines.  The following is an example of that output:



  • Some 4690 device filename information: ANDISPLAY: is ADXPIA, ANDISPLAY2: is ADXPIA2, CDRAWER: is ADXPID, IOPROC: is ADXPII, MSR: is ADXPIM, CR: is ADXPIPR, DI: is ADXPIPD, TOTRET: is ADXPIT.


 
© 2013 QVS Software, Inc.