windows - 消费 "Event Tracing for Windows"事件

标签 windows logging trace etw

this 的回答这个问题让我考虑使用“Windows 事件跟踪”来满足我们的跟踪需求。我遇到过NTrace ,这似乎是从 C# 代码生成 ETW 事件的好方法(使用与 XP 兼容的“经典提供程序”模型)。

但是,我无法找到一种简单的方法来使用这些事件 - 实时查看它们和/或将它们记录到文件中。我找到的唯一方法是 NTrace 文档中描述的方法:使用仅作为 Windows DDK 的一部分提供的工具。

在现场出现复杂问题的情况下,我们可能需要要求用户 生成包含跟踪的文件。我们不能要求用户下载 DDK 或执行一些复杂的操作来执行此操作。

是否有直接、用户友好的方式将 ETW 事件记录到文件中?

此外,如果某人未以管理员身份运行,是否可以在 Windows Vista/7 上使用 ETW 事件?

最佳答案

TraceView 是最简单的开箱即用解决方案,但也可以编写您自己的特定于您的提供商的 ETW 查看器。这将使您能够完全控制演示文稿,并使最终用户更轻松,因为 TraceView 实际上更像是一种调试工具,而不是您可以要求最终用户运行的工具。

就实时跟踪而言,according to the documentation :

Only users with administrative privileges, users in the Performance Log Users group, and services running as LocalSystem, LocalService, NetworkService can consume events in real time. To grant a restricted user the ability to consume events in real time, add them to the Performance Log Users group.

Windows XP and Windows 2000: Anyone can consume real time events.

如果您有兴趣编写自己的 ETW 查看器(实时或日志文件),here is the relevant documentation .

关于windows - 消费 "Event Tracing for Windows"事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2384161/

相关文章:

ruby-on-rails - Windows 上的 Rails - 安装问题

python - Pycrypto - 在 Linux 上加密/在 Windows 上解密

c++ - 尝试编译类实现时对 "winmain"的 undefined reference

elasticsearch - 我们可以从Elastic搜索引擎下载日志文件吗?

java - java日志文件中$$$view的含义是什么?

mysql - 如何在 Web 应用程序中记录用户操作?

linux-kernel - 使用我们的计时器逐个函数(仅最大)跟踪 Linux 内核

linux - KVM-QEMU 开启时,Intel-PT 不记录任何数据包

windows - 如何在Windows中安装SQLite(当没有sqlite-shell和sqlite3.exe时)?

Python 记录器不遵守 setLevel?