控制多个系统上的 PerfMon 日志记录

发布于 2024-08-08 10:32:57 字数 312 浏览 5 评论 0原文

我需要使用 PerfMon 从多台机器收集数据,并且需要能够在特定时间打开/关闭收集。我已经在每台机器上配置了所有数据点;我只需要启动/停止 PerfMon,并启动/停止一组数据点的收集。

由于我不会详细介绍的原因,我无法简单地配置单台计算机上单个 PerfMon 实例的所有收集 - 我需要(大约)同时在多台计算机上启动/停止 PerfMon 数据收集。

所涉及的系统都运行Windows 2003 Server,并且我无法在系统上安装任何其他软件。

是否可以使用 PowerShell(或 Windows 2003 服务器上通常安装的其他工具)来执行此操作?

I need to use PerfMon to collect data from several machines, and I need to be able to turn collection on/off at certain times. I've got all the data points configured on each machine; I just need to start/stop PerfMon, and to start/stop collection of a set of data points.

For reasons I won't go into, I can't simply configure all collection from a single PerfMon instance on a single machine - I need to start/stop PerfMon data collection on multiple machines at (about) the same time.

The systems involved are all running Windows 2003 Server, and I'm unable to install any additional software on the systems.

Is it possible to do this using e.g. PowerShell (or something else that's normally installed on Windows 2003 servers)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱人如己 2024-08-15 10:32:57

查看 logman.exe。您可以使用它来创建计数器(如果您已经有模板定义)以及启动/停止 perfmon 数据收集。请参阅性能监视器概述,了解有关执行 logman.exe 的帐户。

从 .bat、MSBuild 或 Nant,您可以执行以下操作:

Logman start [日志名称] -s [计算机名称]

Logman stop [日志名称] -s [计算机名称]

收集完所有这些日志文件后,您可以使用 relog.exe 将它们导入到 SQL 实例中,以便您可以更轻松地查询/报告它们。

我知道您提到您无法安装任何其他软件,但是...根据您的实验室或其他环境的设置,您可能需要考虑将 perfmon 日志记录到 sql 数据存储。即使它是在环境中的服务器上运行的 Sql Express 实例,它可能会让您的生活更轻松。至少它可以/会跳过将数据导入到单个存储中,以便于查询/分析。

祝你好运!

Z

Take a look at logman.exe. You can use it to create countersets (if you already have a template definition) as well as to start/stop perfmon data collection. See this Overview of Performance Monitor for some information on security requirements of the account executing logman.exe.

From .bat, MSBuild or Nant you can do something like:

Logman start [logname] -s [computername]
or
Logman stop [logname] -s [computername]

Once you've collected all those log files you can use relog.exe to import them into a sql instance so that you can more easily query/report against them.

I know you mentioned you can't install any additional software, but...depending on the setup of your lab, or other environment, you might want to consider having perfmon log to a sql data store. Even if its a Sql Express instance running on a server in the environment it might make your life easier. At least it could/would skip the importing of the data into a single store to make it easy to query/analyze.

Good luck!

Z

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文