Can get traceview to work but not tracelog

I’ve added WPP tracing to my driver. The driver is built with the 2000
build environment of the 2003 Server SP1 DDK. I’ve got logging working in
traceview, but not using tracelog. In traceview I do the following:

  1. File->Create New Log Session -> Add Provider
  2. Select CTL (Control GUID) File
  3. My .ctl file contains this:

458D3DCF-ADF2-4da1-AD45-316DEACB2EB9 CtlGuid

  1. Choose “Select TMF Files” and add the TMF file tracepdb gave me.
  2. Select the defauls on the Log Session Options page (real time display and
    leave the Log Session Name LogSession0

If I do stuff to my driver, I get all the trace data I expect. If from the
Log Session Options page I tell it to create a .etl file, it works great and
I can load it up, point to my .tmf file and get the correct traces.

When I use tracelog with the following command, I would expect to get a log
file with the traces, but I just get an empty file:

tracelog -start LogSession0 -guid z:\loginfo\filevol.ctl -f
h:\filevol.etl -flag 0xfff -level 0xfff

I just get an empty log file.

Does anyone know why? I’ve searched the forum and documentaion and can’t
figure out what I’m doing wrong. It looks like the other examples I’ve
seen.

Thanks,

Jonathan

If you are testing in W2K, your driver must register first before the
session can be created with tracelog, in XP and avobe that is not
required and you can start a session before the driver registers. After
you do your tracing you need to stop the session with :
Tracelog -stop LogSession0

-level must be lower that 0xff, but I don’t think that is a problem.

Does tracelog give any errors ?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jonathan Ludwig
Sent: Tuesday, September 13, 2005 3:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Can get traceview to work but not tracelog

I’ve added WPP tracing to my driver. The driver is built with the 2000
build environment of the 2003 Server SP1 DDK. I’ve got logging working
in traceview, but not using tracelog. In traceview I do the following:

  1. File->Create New Log Session -> Add Provider
  2. Select CTL (Control GUID) File
  3. My .ctl file contains this:

458D3DCF-ADF2-4da1-AD45-316DEACB2EB9 CtlGuid

  1. Choose “Select TMF Files” and add the TMF file tracepdb gave me.
  2. Select the defauls on the Log Session Options page (real time display
    and leave the Log Session Name LogSession0

If I do stuff to my driver, I get all the trace data I expect. If from
the Log Session Options page I tell it to create a .etl file, it works
great and I can load it up, point to my .tmf file and get the correct
traces.

When I use tracelog with the following command, I would expect to get a
log file with the traces, but I just get an empty file:

tracelog -start LogSession0 -guid z:\loginfo\filevol.ctl -f
h:\filevol.etl -flag 0xfff -level 0xfff

I just get an empty log file.

Does anyone know why? I’ve searched the forum and documentaion and
can’t figure out what I’m doing wrong. It looks like the other examples
I’ve seen.

Thanks,

Jonathan


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

I’m running under Windows 2003 Server. I assume the level means anything
that value and higher. Would that mean that -level 0 would display all of
the levels? I can create a session that is logged to a file with traceview
and that works too.

I don’t get any errors from tracelog. I do get the following output:

Logger Started…
Enabling trace to logger 3
Operation Status: 0L The operation completed successfully.

Logger Name: LogSession0
Logger Id: 3
Logger Thread Id: 00000694
Buffer Size: 8 Kb
Maximum Buffers: 25
Minimum Buffers: 3
Number of Buffers: 3
Free Buffers: 2
Buffers Written: 1
Events Lost: 0
Log Buffers Lost: 0
Real Time Buffers Lost: 0
AgeLimit: 15
Log File Mode: Sequential
Enabled tracing: 0x0000ffff
Log Filename: h:\filevol.etl

I’ve tried flushing the log session and I’ve always stopped it at the end,
but I still don’t get any events.

“Jose Sua” wrote in message
news:xxxxx@ntdev…
If you are testing in W2K, your driver must register first before the
session can be created with tracelog, in XP and avobe that is not
required and you can start a session before the driver registers. After
you do your tracing you need to stop the session with :
Tracelog -stop LogSession0

-level must be lower that 0xff, but I don’t think that is a problem.

Does tracelog give any errors ?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jonathan Ludwig
Sent: Tuesday, September 13, 2005 3:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Can get traceview to work but not tracelog

I’ve added WPP tracing to my driver. The driver is built with the 2000
build environment of the 2003 Server SP1 DDK. I’ve got logging working
in traceview, but not using tracelog. In traceview I do the following:

1) File->Create New Log Session -> Add Provider
2) Select CTL (Control GUID) File
3) My .ctl file contains this:

458D3DCF-ADF2-4da1-AD45-316DEACB2EB9 CtlGuid

4) Choose “Select TMF Files” and add the TMF file tracepdb gave me.
5) Select the defauls on the Log Session Options page (real time display
and leave the Log Session Name LogSession0

If I do stuff to my driver, I get all the trace data I expect. If from
the Log Session Options page I tell it to create a .etl file, it works
great and I can load it up, point to my .tmf file and get the correct
traces.

When I use tracelog with the following command, I would expect to get a
log file with the traces, but I just get an empty file:

tracelog -start LogSession0 -guid z:\loginfo\filevol.ctl -f
h:\filevol.etl -flag 0xfff -level 0xfff

I just get an empty log file.

Does anyone know why? I’ve searched the forum and documentaion and
can’t figure out what I’m doing wrong. It looks like the other examples
I’ve seen.

Thanks,

Jonathan


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

I figured it out using the -enumguid option of tracelog. Even after
specifying -level 0xFF the -enumguid option showed the level as 0. When I
used traceview, it showed as 255. Then I decided to try -level 255 from
tracelog and it worked. The documentation says that it can be decimal or
hexidecimal and the -flag parameter works with 0xFFFF, but apperantly there
is a bug in tracelog where -level doesn’t handle hexidecimal.

“Jonathan Ludwig” wrote in message
news:xxxxx@ntdev…
> I’ve added WPP tracing to my driver. The driver is built with the 2000
> build environment of the 2003 Server SP1 DDK. I’ve got logging working in
> traceview, but not using tracelog. In traceview I do the following:
>
> 1) File->Create New Log Session -> Add Provider
> 2) Select CTL (Control GUID) File
> 3) My .ctl file contains this:
>
> 458D3DCF-ADF2-4da1-AD45-316DEACB2EB9 CtlGuid
>
> 4) Choose “Select TMF Files” and add the TMF file tracepdb gave me.
> 5) Select the defauls on the Log Session Options page (real time display
> and leave the Log Session Name LogSession0
>
> If I do stuff to my driver, I get all the trace data I expect. If from
> the Log Session Options page I tell it to create a .etl file, it works
> great and I can load it up, point to my .tmf file and get the correct
> traces.
>
> When I use tracelog with the following command, I would expect to get a
> log file with the traces, but I just get an empty file:
>
> tracelog -start LogSession0 -guid z:\loginfo\filevol.ctl -f
> h:\filevol.etl -flag 0xfff -level 0xfff
>
> I just get an empty log file.
>
> Does anyone know why? I’ve searched the forum and documentaion and can’t
> figure out what I’m doing wrong. It looks like the other examples I’ve
> seen.
>
> Thanks,
>
> Jonathan
>
>