gpt4 book ai didi

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

转载 作者:可可西里 更新时间:2023-11-01 13:06:43 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com