r4 - 03 Nov 2006 - 21:12:45 - BrianSwanYou are here: TWiki >  Main Web  > DataLogging

Data Logging

In this section:

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.

Comments/Questions

Post Comment

Enter a comment or question regarding this topic in the box below. The comments will appear above. Please note that you need to be logged in to add a comment.

-- GtPaine - 27 Oct 2006

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformWebsite hosting provided by CBPNet Wireless, a division of Cooke Business Products, Inc.
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback