Trying to figure out how to make sure a specific Windows Perfmon Counter Log resumes logging automatically when the server is rebooted.
This is a Windows 2003 Server, so likely won't have anyone logging on to it immediately upon reboot. I saw this similar question, but didn't think that Scheduled Tasks execute without someone logging on...
Edit: Ok, looks like Scheduled Tasks can be set to run a command each server start, but a couple of remaining questions:
- On the "Schedule" tab, should I leave both the "Start log" and "Stop Log" to "manual"? Then use the LOGMAN START command?
- I saw some other web references to instead setting the "Stop Log" to 1 day, and checking the "When a log file closes: Start a new log file" checkbox. Any benefits to this approach? Does it recognize and survive a reboot without the explicit LOGMAN START command?
- The task scheduler UI, on the Settings tab, has a box marked "Stop the task if it runs for..." that defaults to 72 hours. If I don't remove this check, will it stop my log once the server is up for 72 hrs?
And a final strategy question: If I want to monitor a handful of servers in this manner, for a short period of time, am I better off setting these monitors up directly on each server, or to run directly on my workstation, gathering data remotely?
OK - I remember how to do this now!
Set the START TIME to now (or the past). Set the STOP AFTER to 9999 days. This will restart the counter automatically after each reboot without the need for a scheduled start script
Scheduled tasks can run even with no user logged on. You provide a username and password for the task (preferably a service account so the password does not expire).
Create a scheduled task that runs Logman.exe to start your performance counter log.
Update: In the "schedule" tab, select some date in the past( and not manaully!). I think that this should be enough. But I didn't test it lately. To make this more complete choose some reasnoble stop condition, and also select start a new log file in the "when a log file is closed" box. I believe this should solve your problem.
Before Update: What do you mean by "performance counter restars?". Performance counter are always available when the system is up and running. If you want to log the data from the counter than you can use the "counter log" feature. You create a new log with the counters you are intrested in. and can configure the scheduling of the logging. It will autostart if the computer reboots.
You can record a non-interactive performance log.
On Windows 7 (and, I assume, Vista) define a "Data Collector Set".
On XP: define a "Counter Log"
(In both cases start by running "perfmon".)
Set up a schedule that runs continuously.
The file created is available in a number of formats, including CSV and suitable for import into the interactive display.