|
I am trying to parse the dr watson log and
trying to get it so that when it fines the pid that generated an exception it
looks from that place in the log and looks for the next instance of the pid
string and prints it out.
Right now it prints out
this:
App:
mmc.exe (pid=2152)
When: 11/28/2001 @ 11:42:46.513 But I want it to print out
this:
App:
mmc.exe (pid=2152)
2152
OUTLOOK.exe
When: 11/28/2001 @ 11:42:46.513 What I have so far is
this:
$drwt = "C:/Documents and Settings/All
Users.WINNT/Documents/DrWatson/drwtsn32.log";
print "<a name=\"drwatson\"></a><br>"; print "<b>Dr Watson Log</b><br>"; if (-e $drwt) { open (DRWTSN, $drwt) ; while (<DRWTSN>) { foreach
$line (<DRWTSN>)
{
if ($line =~ /App\:/) { print "<b>$line</b><br>"; } if ($line =~ /When\:/) { print "$line<br>"; } if ($line =~ /Exception\Snumber\:/) { print "$line<br><br><br>"; } } } close DRWTSN; } else {
print "No Dr Watson Log in All Users.WINNT\Documents\DrWatson"; } Thanks for any
help!
|
Title: Message
- Perl for Linux System Administrator lonh SENG
- RE: Perl for Linux System Administrator rothd
- Re: Parsing pids from drwtsn.log Nikko Odiseos
- Re: Parsing pids from drwtsn.log $Bill Luebkert
