The build action of mwalk runs the Builder java application. The user passes a list of directories containing parsed RTCP and mtrace logs and either an existing tree to expand or the IP address of the source of the session. Builder opens the existing file or creates a new tree accordingly.
The statistics file, genrated by parse, is checked to determine the beginning and ending timestamps for the session. Receivers are then added to the tree. The intervals of activity, as derived from the RTCP logs, are used to build an activity table for each receiver. The mtrace logs are used to build paths from each receiver back to the source, adding intermediate router along the way. The timestamp on each mtrace is used to build a table for each link in the tree, indicating intervals of known activity. A path remains active until a newer trace indicates a new parent for a particular node along the path.
Once the tree (really a graph) is constructed, it is written out in a binary representation that can be reloaded later. The tree is saved at this point because the next steps are in some ways destructive, and if we want to add new receivers or paths to the tree later, we need a complete version. The complete version, however, is not ideal for animating. So, before the tree is actually used, Builder performs three maintenance procedures:
- Receivers without a valid path to the source are removed.
- Activity tables at the receivers and links are minimized. Overlapping intervals are merged to reduce the memory footprint and processing time.
- The primary path for each receiver is marked. Primary paths are determined by selecting the parent link that is active for the largest part of the session. Many visitors use the "primary tree" rather than time-specific active trees.
An interesting property of Builder is that many of the steps that it performs are handled by specialized visitors. For example, paths are built using the TraceVisitor and primary paths are marked using the PrimaryPathVisitor.
|
|
To run the build action, use the syntax listed below. The pause flag is good for debuuging because it gives you a chance to see any verbose output at each stage of the walk, but it can become quite tedious for large trees. The configuration file is used by visitors to change their default behavior. The file is formatted as key/value pairs. Each path listed in the directory list will be searched for files produced by the `parse' action and all files will be combined into a single session. If you do not provide an output filename, then the default of "tree" will be used. To expand an existing tree, pass the name of an existing tree file to Builder. Otherwise, you must indicate the IP address of the source. This is necessary to distinguish between intermixed logs where traces may exist for multiple session sources.
|