Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

5 Answers

up vote 4 down vote accepted

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

share|improve this answer
    
Ding, ding, ding! We have winner! Thanks, Guy! Not sure 100% if it requires it, but I'm also going to set the "Run As" to make sure the user has the proper privileges to read the SQL perfmon counters. –  BradC Sep 29 '09 at 15:20
    
We log the counters to a SQL server database (just create a machine ODBC link to a SQL Server database) and then set the username/password there. Set this up as the local machine administrator (or equivalent). Then you can use PerfMon "Load Log File" from ODBC (same as before) to show the data - or just use Excel and a Pivot table (as I do yo create pretty reports for the PHB's) –  Guy Sep 30 '09 at 15:25
add comment

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

share|improve this answer
add comment

Create a scheduled task that runs Logman.exe to start your performance counter log.

share|improve this answer
add comment

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.

share|improve this answer
    
That's the point, I already had a counter log set up, and it did NOT autostart after the reboot. What "schedule" settings are necessary for it to do so? –  BradC Sep 9 '09 at 0:05
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.