RE: Trace Viewer

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mike Hayton [MS] (mikehayt__at_online.microsoft.com)
Date: 07/28/04


Date: Wed, 28 Jul 2004 02:06:48 GMT

This question was answered via straight email.

The ultimate response was (from memory):
- no way from the current API of reading in a random acess form. The
underlying unmanaged API (ProcessTrace()) doesnt allow this.
- it was recommended that you roll over the log files at a regular time
interval, so they are in more managable sizes (I'll attach a script to the
end of this email to do this).
- with truely large volumes of data, it really becomes necessary to upload
it into a DB and perform SQL queries on it to slice and dice it.

Cheers

Mike

==============================
wscript.echo "Script started ..."

dtNow = Now
sNow = Year(dtNow) & Right("0" & Month(dtNow),2) & Right("0" &
Day(dtNow),2) & "T" & Right("0" & Hour(dtNow),2) & Right("0" &
Minute(dtNow),2) & Right("0" & Second(dtNow),2)

Set traceSettings =
CreateObject("Microsoft.EnterpriseInstrumentation.Configuration.TraceSetting
s")

strTraceConfigFile = traceSettings.GetConfigFileLocation()
traceSettings.load(strTraceConfigFile)

Set colTraceSessions = traceSettings.TraceSessions

For Each traceSession In colTraceSessions

        wscript.echo "Trace Session Name: " & traceSession.Name
        wscript.echo "Trace Session Log Name: " & traceSession.FileName
        wscript.echo "Trace Session Status: " & traceSession.Enabled

        If traceSession.Enabled Then
                path = Left( traceSession.FileName, InStrRev( traceSession.FileName, "\"
) )
                traceSession.FileName = path & traceSession.Name & "_" & sNow & ".log"
                wscript.echo "New Trace Session Log Name: " & traceSession.FileName
        End If

Next
 
'Since the trace session.config file has been changed we need to save it
   
If traceSettings.IsDirty Then
        wscript.echo "Saving configuration changes"
        traceSettings.Save
End If

wscript.echo "Script terminated."

--------------------
|
| We are using trace viewer to view the logs generated by EIF. This is a
just sample program that comes along with EIF (as a source). This viewer is
absolutly not capable of viewing large files say more than 300 MB.
Ofcourse, when you instrument your application for months, you may get log
files in GB. Is there any other viewers are available to view these large
files?
|
| I tried to write one trace viewer using virtual list view control. But
the EIF provides only one method TraceLogReader.ReadLogFile to read all the
events once at file level. This method reads the entire file. Is there any
other methods provided reading one event at a time instead of reading
entire file once? (Very poor framework?!) In this way, I can achieve this
virtual list view control based trace viewer.
|
| Any help would be highly appreciable.
|
| thank you...
|
|

-- 
This posting is provided "AS IS" with no warranties, and confers no rights. 
Use of included script samples are subject to the terms specified at 
http://www.microsoft.com/info/cpyright.htm 


Relevant Pages

  • Where did the prophet really live?
    ... > under "North Arabian" is Classical Arabic and idioms that, ... explains why Old Arabic and ANA where written in the Sabaic script. ... Sabaic was the prestige script of the region. ... One doesn't need to dissociate the great reading from the prophet to ...
    (soc.religion.islam)
  • Re: No such file or directory
    ... Still cannot see why Perl complains that Could not open file for reading. ... I have modified my script and now using Getopt::Long module instead of the ... foreach $list { ...
    (perl.beginners)
  • Re: Find and replace with vbscript
    ... Try running Filemon while you run your ... I ran a variation of your script as follows below. ... recorded that WScript began reading at log entry 1187, ... It finished writing at log entry 313307, ...
    (microsoft.public.scripting.vbscript)
  • Re: Apparent Memory Issues
    ... I have a new class to process the gpx file. ... data in each gps point) and the script runs fine. ... echo some information*/} ... now the error propegates in that i'm reading the data from ...
    (comp.lang.php)