--------------------
From: "=?Utf-8?B?ZnJlZGVyaWMgbWVybGU=?=" <
[email protected]>
Subject: RE: Performance Monitor Counters
Date: Wed, 31 Mar 2004 02:36:07 -0800
Newsgroups: microsoft.public.win2000.advanced_server
Bill,
When I reboot or restart the service "Performance Logs and Alerts" all logs and alerts remain stopped, even if the "Start a
new log file" in the "After a log file
closes" section on the Schedule tab of the logs properties is set to on
How can I force a log to restart automatically (or programmatically by script ?) on the service start-up
Thanks
Frederic
---
This only works if the log is already started and the system is rebooted, it should cause the log to continue once the system
is backup. If the log is stopped when the system is rebooted it will not start it again. I test it and you are correct if does not
restart the log if we stop and restart the Performance Logs and Alerts service.
Do you have access to a Windows XP system? I ask because there are two files from Windows XP, Logman.exe and
Pdh.dll, which we can copy to a Windows 2000 system and then use then to start a stopped log. To do this we would create
the folder C:\Mylogs on the Windows 2000 system and copy the two files mentioned above into this folder. Now in
Performance Monitor we would create a CSV log with a name, example: REBOOT, and make sure you set it to end with
mmddhh formatting. Now we need to create a batch file called Mylogs.cmd similar to the following:
c:
cd\mylogs
logman start reboot
We can now use this batch file as part of a script, in the Startup group or the Run registry key, or simply as a desktop icon.
When this batch file is executed it will start the log with a name of REBOOT, appending a new mmddhh each time it is
started.
You can use any name for the log as long as you the same name in the batch file.
Bill Peele
Microsoft Enterprise Support
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the
terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread
from which they originated.