Thanks Felix. That's gotten me going again.. ;) Now I'll just figure out how to take one error at a time and then evaluate what it contains, and count the number of times it ocurs to then print out what I've found.. easy enough, eh? ;)
Ah well, now I have something to work from in any case!! Cheers! Best Regards Anders Holm Critical Path Technical Support Engineer ---------------------------------------------------------------------- Tel USA/Canada: 1 800 353 8437 Tel Worldwide: +1 801 736 0806 E-mail: [EMAIL PROTECTED] Internet: http://support.cp.net > -----Original Message----- > From: Felix Geerinckx [mailto:[EMAIL PROTECTED]] > Sent: 03 July 2002 16:19 > To: [EMAIL PROTECTED] > Subject: Re: Correlating Log entries > > > on Wed, 03 Jul 2002 13:56:22 GMT, Anders Holm wrote: > > > I'm banging my head in trying to get the logic behind doing this, so > > any pointers are appreciated.. > > (Don't do that, it hurts ;-) > > > AlarmInd:At=1025647244084,Point=Adm.Monitor,Text=process stops due to > > client disconnected,Code=1, > > > > So, here is an Alarm Indication, UTC time when occurred, where it > > occurred in the app., a text describing the problem, and an error > > code. Now, what I want to do is to output that a problem occurred, > > what it was, when, where, and how many times it reoccurred in this > > log file. I guess I'd need to index this based on the error code (for > > simplicities sake), sort on where it occurred, and add a counter into > > the equation. > > The following creates a hash of arrays of hashes. Maybe you could start > from there? > > #! perl -w > use strict; > use Data::Dumper; > > my %alarms; > > while (<DATA>) { > s/^AlarmInd://; > my %params = /(.*?)=(.*?),/g; > push @{$alarms{$params{Code}}}, {%params}; > } > > print Dumper(\%alarms); # show datastructure > > > -- > felix > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]