Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.
Endpoint Management Community Blog

{CWoC} Two days on: Altiris log analyzer has no name, and looks to be a c# program

Created: 08 Dec 2009 • Updated: 08 Dec 2009
Ludovic Ferre's picture
0 0 Votes
Login to vote

After spending a little bit of time Sunday morning coding a c program to handle the command line arguments (to some mixed results) I built a similar program using .Net (and Mono Develop) in less than 10 minutes, with a file parser in less than 20.

Okay, the prototype doesn't do anything that stunning but it counts the lines and returns the value as well as a count of bytes found in all line (so it should be a little less than the file size, given we don't count the eol char).

Last night I was drawing in order to work out how to best store statics on the parsed lines in memory. And the following data hierarchy came about this design session:

data_hierarchy.png

The 3 data structures are explained here:

  1. Line data: summary information and statistics on the content (all values = 1)
  2. Chuncks: this is an intermediate level to avoid keeping all LineData in memory. It could be done but having a mid-tier is also useful to feed data out (progress bar of some kind etc)
  3. File data: this is the file overall data containing a summary and statistiqcs

In details the 3 structures are containing the same information (but more or less aggregated) so all in all we only have one data structure (for now):

data_structure.png

So next we'll be interested in how we can populated this data and do the aggregation at the chunck and file levels.

Good day!