Windows Event Viewer understanding

Here is the information on Watson Buckets

  1. Exe File Name
  2. Exe File assembly version number
  3. Exe File Stamp
  4. Exe file full assembly name
  5. Faulting assembly version
  6. Faulting assembly timestamp
  7. Faulting assembly method def
  8. Faulting method IL Offset within the faulting method
  9. Exception type

And also here is a MSDN article on the same.

Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: chsservice1.exe
P2: 2.2.2.0
P3: 52849aba
P4: FCC.XXX.ConfigurationData
P5: 1.0.2.0
P6: 52849ab1
P7: 52
P8: 4f
P9: T1CPFHPH4G2XSLVWXC4VNPCSLV1SFT3F
P10: 

Attached files:

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_chsservice1.exe_de1c92f3f573ddb6bfa31fd5b512cb971ff1_65120f86

Analysis symbol: 
Rechecking for solution: 0
Report Id: 5eab2fdb-4da6-11e3-8d1f-005056a4662e
Report Status: 4


### Windows Event Log Library Usage Windows Event Log 是一种用于记录应用程序、系统和服务的重要事件的日志机制。它允许开发者创建自定义日志条目并查询现有日志。以下是关于如何使用 Windows Event Log 的详细介绍。 #### 创建和写入事件日志 要向 Windows Event Log 中写入消息,可以使用 `EventLog` 类(适用于 .NET Framework 或 .NET Core)。下面是一个简单的 C# 示例,展示如何注册一个新的事件源并向其写入一条消息: ```csharp using System; using System.Diagnostics; class Program { static void Main() { string logName = "Application"; // 日志名称 string sourceName = "MyCustomSource"; // 自定义事件源 if (!EventLog.SourceExists(sourceName)) { EventLog.CreateEventSource(sourceName, logName); } EventLog.WriteEntry(sourceName, "This is a test message.", EventLogEntryType.Information); // 写入信息型日志 } } ``` 上述代码片段展示了如何通过指定的源名向 Application 日志中写入一条测试消息[^1]。 #### 查询事件日志 为了读取现有的事件日志数据,可以利用 PowerShell 脚本或者编程方式实现。例如,在 Python 中可以通过 `pywin32` 库访问 Windows API 并检索特定类型的事件日志项: ```python import win32evtlogutil import win32evtlog server = 'localhost' # 远程服务器也可以设置为其他主机名/IP地址 logtype = 'Application' hand = win32evtlog.OpenEventLog(server, logtype) flags = win32evtlog.EVENTLOG_BACKWARDS_READ | win32evtlog.EVENTLOG_SEQUENTIAL_READ total = win32evtlog.GetNumberOfEventLogRecords(hand) events = win32evtlog.ReadEventLog(hand, flags, 0) if events: for event in events: print(f"Event Category: {event.EventCategory}") print(f"Time Generated: {event.TimeGenerated}") print(f"Source Name: {event.SourceName}") print(f"Event ID: {event.EventID}") ``` 此脚本会连接到本地计算机上的 Application 日志,并打印最近的一些事件详情[^2]。 #### 配置和管理事件日志 除了基本的操作外,还可以配置高级选项来优化性能或满足安全需求。这包括但不限于调整最大文件大小、启用存档功能以及设置保留策略等参数。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值