views:

549

answers:

1

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)?

+3  A: 

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

Zach Bonham
Thanks Zach, that's a good suggestion. Haven't come across logman before, and it looks pretty powerful.
monch1962