Page 2 of 3 <123>
Topic Options
#166822 - 2006-09-06 07:52 PM Re: Deleting Events from the .EVT file
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
Just to add: i m using KiXtart 4.52 !
Top
#166823 - 2006-09-06 09:03 PM Re: Deleting Events from the .EVT file
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Is the file comma delilited or tab delimited?
I thought you were looking for event 560?
I think the EventID is on the sixth position.
I think splitting the lines would give a more certain result.
Code:

If Not Split($x,",")[5] = "560"
;If Not Split($x,Chr(9))[5] = "560" ;if TAB delimited
;Write stuff $x to file2.txt
EndIf


Top
#166824 - 2006-09-06 09:08 PM Re: Deleting Events from the .EVT file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Code:

$Handle1 = FreeFileHandle()
$Handle2 = FreeFileHandle()



you can't do this!
both handles are the same as you don't open the first file before querying the second handle.

Top
#166825 - 2006-09-06 11:13 PM Re: Deleting Events from the .EVT file
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
What about:
Code:

If NOT @LOGONMODE
Break ON
EndIf
Dim $SO
$SO = SetOption("Explicit","On")
$SO = SetOption("NoMacrosInStrings","On")
$SO = SetOption("NoVarsInStrings","On")
$SO = SetOption("WrapAtEOL","On")

Dim $InputFile, $OutputFile, $Handle1, $Handle2, $Line
$InputFile = "file1.txt"
$OutputFile = "file2.txt"

;Open first file for read, if fails, end code
$Handle1 = FreeFileHandle()
If Open($Handle1,$InputFile,2) = 0
;Open second file for write, if fails, close first file, end code
$Handle2 = FreeFileHandle()
If Open($Handle2,$OutputFile,5) = 0
;Read line after line until error code indicates there are no lines anymore
$Line = ReadLine($Handle1)
While @ERROR = 0
;If NOT event 560 occurred, write line to second file
If NOT Split($Line,",")[5] = "560"
$SO = WriteLine($Handle2,$Line + Chr(13) + Chr(10))
EndIf
$Line = ReadLine($Handle1)
Loop
;Close files
$SO = Close($Handle1)
$SO = Close($Handle2)
Else
$SO = Close($Handle1)
EndIf
EndIf



Edited by Witto (2006-09-07 10:30 PM)

Top
#166826 - 2006-09-07 07:40 PM Re: Deleting Events from the .EVT file
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
Quote:

Is the file comma delilited or tab delimited?
I thought you were looking for event 560?
I think the EventID is on the sixth position.
I think splitting the lines would give a more certain result.




The file is tab delimited
I m actually looking for each ID individually. When the file size is reduced, it becomes easier to log.
Splitting the lines also didnt help.
actually the script is not able to read the input file; may be it because of UNICODE issue. (I used event viewer to generate a sample text file)

Top
#166827 - 2006-09-07 07:45 PM Re: Deleting Events from the .EVT file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, did you fix your script or are you still using the bad syntax??
Top
#166828 - 2006-09-07 07:49 PM Re: Deleting Events from the .EVT file
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
i had used the code written by witto!
Top
#166829 - 2006-09-07 09:11 PM Re: Deleting Events from the .EVT file
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
So what is wrong with using these tools from Microsoft to extract ONLY the events you want? Then there is no size issues, and there is no scrolling through a list to find them.
Top
#166830 - 2006-09-07 09:20 PM Re: Deleting Events from the .EVT file
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
Dear NTDOC, Microsoft tools read the event viewer & NOT the .evt file.I have been provided ONLY the .EVT file. Currently, my job is to check for specific EVENT IDs; for that i need to scan the ENTIRE .evt file.
The .evt file contains around 10 million rows (around 700 MB) making my job really difficult. I tried to extract the event info to a text file, but it was of no help; i didnt get any correct results.
It's already around 1 AM in India, need to go home....

Top
#166831 - 2006-09-07 09:46 PM Re: Deleting Events from the .EVT file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
was just thinking...
10 million rows...

have you tried reading with the 4.53 RC-1?

there was a fix for large files in one of the builds, but can't remember which one.

Top
#166832 - 2006-09-07 10:27 PM Re: Deleting Events from the .EVT file
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Well, I am sorry to hear my code did not work for you. I tried it on a very small comma delimited file (csv) that I extracted from my Event Viewer @home. I used KiX 4.53 RC-1.
[Edit]
I see I forgot to paste my declarations in my code, so I changed it.
So check the code I posted earlier.
Code:

Dim $InputFile, $OutputFile, $Handle1, $Handle2, $Line
$InputFile = "file1.txt"
$OutputFile = "file2.txt"



Edited by Witto (2006-09-07 10:32 PM)

Top
#166833 - 2006-09-08 12:03 AM Re: Deleting Events from the .EVT file
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Well maybe Howard B will step in here and provide you some VB Dictionary code or RegEx code that might be able to do the trick.

paging HB....

Top
#166834 - 2006-09-08 08:33 AM Re: Deleting Events from the .EVT file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doc, that's blashemy
Top
#166835 - 2006-09-08 11:32 AM Re: Deleting Events from the .EVT file
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Maybe so... but we all know that as much as we love KiX there are still a couple things that other beast is better at until Ruud updates KiX to handle it.
Top
#166836 - 2006-09-08 11:46 AM Re: Deleting Events from the .EVT file
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I saved an application log of about 2250 lines to CSV, and it is 605KB.
If your file is 10 million rows, you have a log of about 2.5GB?
Or did I make somewhere a mistake?

Top
#166837 - 2006-09-08 12:18 PM Re: Deleting Events from the .EVT file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doc, like said, there is an issue with kixtart handling large files.
he should try with 4.53 RC-1 if it solves his issue.

Top
#166838 - 2006-09-08 02:50 PM Re: Deleting Events from the .EVT file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You guys are off on a tangent. He has an .EVT file that is too big to export to Excel. Since when can KiX read an .EVT file?

Besides fixing what causes excessive events to write to the log, the best solution I can see is to export more frequently before they get too large to export.

Top
#166839 - 2006-09-08 03:26 PM Re: Deleting Events from the .EVT file
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
AstaaLavista,
It was exported to txt format (tab delimited) like you said in post #167321, wasn't it?

Top
#166840 - 2006-09-08 06:49 PM Re: Deleting Events from the .EVT file
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
hmmm, sorry guys for the that mistake. Actually it is around 1-3 million rows. i was really sleepy & so added the EXTRA zero...
yeah Witto , i tried with the formats - txt format (tab delimited) but of no help...

Les: Actually huge logs are being generated due to some nonsense things done by some folks. the net guys are not ready to make any corresponding changes to their policy, they have simply ask me to bear with it...
currently, i m doing the process manually... once our audit is complete (5 days), i will definitely write an application that will help me & others to read an .EVT file.

Top
#166841 - 2006-09-08 06:57 PM Re: Deleting Events from the .EVT file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
astaalavista, so did you or did you not try with the new kixtart RC?!?!?!?!?!?!?!?!
Top
Page 2 of 3 <123>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 366 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.1 seconds in which 0.041 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org