다음을 통해 공유


How to enable to iSCSI ETW logging for Windows Server 2003 with initiator 2.08 and Windows Server 2008.

Event Tracing in MS iSCSI Drivers

The following sections describe how to enable event tracing in MS iSCSI drivers. Event tracing can be very useful in diagnosing failures.

Creating the trguid.ctl file required for tracing

Before beginning tracing, you must first create a text file which contains the following information on the first line using Notepad then renaming the .txt to trguid.ctl.

Here, the trace GUID is given in the file by name trguid.ctl and is the filename used with the rest of the examples in this section. The GUID file should contain the following one line:

{1babefb4-59cb-49e5-9698-fd38ac830a91} 0x00000007 0

Start Trace

To start tracing, do the following from a CMD Prompt:

logman.exe create trace <Name> -ets -nb 16 256 -bs 64 -o <LogFile> -pf <GUID File>

logman.exe is present in %windir%\system32 directory. The above command starts a trace session. The name <Name> is assigned to that session. The trace level is controlled by the value of the flag in the GUID File. <Guid File> contains the trace GUID and trace flag. The trace messages are written to <Log File>.

For example, to start a trace session by name iScsiTrace with verbosity level iScsiDebugTrace, and log file iScsiTr.log, do the following:

logman.exe create trace iScsiTrace -ets -nb 16 256 -bs 64 -o iScsiTr.log -pf trguid.ctl

Stop Tracing

To stop tracing do the following from CMD prompt:

logman.exe stop <Name> -ets

For example, to stop the trace session with name iScsiTrace, do the following:

logman stop iScsiTrace -ets

The log file is a binary file. If you are troubleshooting an iSCSI issue via Microsoft Product support services, please send the log file to them to assist in analyzing the failure.

Query Trace Status

To verify that tracing is running properly, do the following from a CMD prompt:

logman.exe query -ets

To return extended information about the tracing status, do the following from the CMD prompt:

logman query iscsitrace -ets

Comments