Debugging Tools for Windows |
!evlog扩展命令用于显示、修改或者备份事件日志(event log)。
!evlog backup [-d] [-l EventLog] [-f BackupFile]
!evlog clear [-!] [-d] [-l EventLog] [-f BackupFile]
!evlog info
!evlog option [-d] [-!] [-n Count] [ -l EventLog [ -+ | -r RecordBound ]] [-o Order] [-w Width]
!evlog read [-d] [-l EventLog] [-s Source] [-e ID] [-c Category] [-t Type] [-n Count] [-r Record]
!evlog report [-s Source] [-e ID] [-c Category] [-t Type] Message
!evlog [Option] -?
对于!evlog option, EventLog指定要设置最大数量(maximum count)的事件日志。可能的值有All、Application、System和 Security。默认为All。
Windows 2000 | Uext.dll |
Windows XP和之后 | Uext.dll |
!evlog扩展只能在活动调试时使用。
使用!evlog addsource在注册表中添加了事件源之后,可以使用!dreg命令来查看它的值。例如:
!evlog option命令用于为!evlog read设置新的默认值。这可以避免在重复使用!evlog read时每次都需要输入所有参数。使用-+参数或者-r Records参数可以为搜索进行限制,在搜索了指定数量的记录之后终止命令。如果仅对某个事件之后的记录感兴趣,那么这种限制是很有用的。
使用!evlog report前,应该用!evlog addsource来在注册表中配置事件源。这种配置之后,事件查看器就可以识别各种事件ID了。
下面是!evlog info扩展命令的示例:
--------------------------------
Application Event Log:
# Records : 4362
Oldest Record # : 1
Newest Record # : 4362
Event Log Full : false
--------------------------------
System Event Log:
# Records : 2296
Oldest Record # : 1
Newest Record # : 2296
Event Log Full : false
--------------------------------
Security Event Log:
# Records : 54544
Oldest Record # : 1
Newest Record # : 54544
Event Log Full : false
--------------------------------
0:000> !evlog option -n 4
Default EvLog Option Settings:
--------------------------------
Max Records Returned: 4
Search Order: Backwards
Data Display Width: 8
--------------------------------
Bounding Record Numbers:
Application Event Log: 0
System Event Log: 0
Security Event Log: 0
--------------------------------
0:000> !evlog read -l application
-------------- 01 --------------
Record #: 4364
Event Type: Error (1)
Event Source: Userenv
Event Category: None (0)
Event ID: 1000 (0xC00003E8)
Date: 06/06/2002
Time: 18:03:17
Description: (1 strings)
The Group Policy client-side extension Security was passed flags (17) and returned a failure status code of (87).
-------------- 02 --------------
Record #: 4363
Event Type: Warning (2)
Event Source: SceCli
Event Category: None (0)
Event ID: 1202 (0x800004B2)
Date: 06/06/2002
Time: 18:03:17
Description: (1 strings)
0x57 : The parameter is incorrect.
Please look for more details in TroubleShooting section in Security Help.
-------------- 03 --------------
Record #: 4362
Event Type: Error (1)
Event Source: Userenv
Event Category: None (0)
Event ID: 1000 (0xC00003E8)
Date: 06/06/2002
Time: 16:04:08
Description: (1 strings)
The Group Policy client-side extension Security was passed flags (17) and returned a failure status code of (87).
-------------- 04 --------------
Record #: 4361
Event Type: Warning (2)
Event Source: SceCli
Event Category: None (0)
Event ID: 1202 (0x800004B2)
Date: 06/06/2002
Time: 16:04:08
Description: (1 strings)
0x57 : The parameter is incorrect.
Please look for more details in TroubleShooting section in Security Help.
WARNING: Max record count (4) exceeded, increase record count to view more