DataLogging

From ATCSMon Wiki
Jump to navigation Jump to search

Data Logging

Introduction

When you monitor a control point either over the air or across the internet you are watching a process control system at work. In addition to updating the application windows and driving the dispatcher display, ATCSmon can also save the packets into a logfile for playback or analysis.

ATCSMon logfiles

To generate a log file during an ATCSmon session, select File > Capture... > To File and specify a filename. Alternatively, to ensure this happens whenever you run ATCSmon, select Configure > Options > General and select the check boxes for "Begin capturing on startup" and "Open new capture file at 12:01". The logfile will be written into the Logs subdirectory with a filename consisting of the profile name followed by the date in YYYYMMDD format, e.g., atcsmon20060401.log .

Playback

To play back a previously captured logfile select File > Replay Capture File... and specify the desired filename. This is quite useful for decoding a control point when you are experiemnting with mnemonic assignments.

Analysis

A simple Perl script is available from the shared files section of the ATCS_Monitor Yahoo! group site. It requires Active Perl, a free download available from http://www.activeware.com . It can be used to filter (extract) packets to or from a given control point or subdivision or for traffic analysis..

example: filter messages associated with a single control point Suppose you are decoding a control point and would like to replay a captured logfile, but don't want the distraction or delay of controls and indication messages to or from other locations. Here's how you can sift through a logfile in order to produce one containing just the messages of interest. If you haven't done so already, download and install Active Perl, and download and unzip log_filter.zip from the ATCS_Monitor Yahoo! group shared files area. Copy the files from the latter into \Program Files\ATCS Monitor\Logs . Open a command prompt window and type the following:

cd \pro*\atcs*\logs perl go.pl -i logfilename -a address -o _outputfilename_

where logfilename is the name of the log file your're filtering, address is the numeric address of the control point whose traffic you want and outfilename specifies the file to which you want the selected messages written. If you have an .mcp file in which the control point is included you can specify the control point by name rather than by its numeric address:

cd \pro*\atcs*\logs perl go.pl -i logfilename -m mcpfilename -a name -o _outputfilename_


where logfilename is the name of the logfile you're filtering, mcpfilename contains the MCP definitions including the control point whose traffic you want and name is its name, and outputfilename specifies the file to which you want the selected messages written. example: traffic analysis The same Perl script can also be used to count movements through a control point or points, just drop the -o option and specify -t

cd \pro*\atcs*\logs perl go.pl -i logfilename -m mcpfilename -a name -t

where logfilename is the name of the logfile you're filtering, mcpfilename contains the MCP definitions including the control point whose traffic you want and name is its name. For traffic from multiple contol points use the -d option to specify division name rather than control point name, or use an asterisk to select all addresses, e.g., -a * Train movements are broken out by direction and track for each matching control point for which movement data was found in the logfile. For a complete description of the log filter script and its options see the readme.txt file included in the distribution package logfilter.zip.