Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We've been trying to create PerfMon counters that contain up to 15 minutes worth of data before writing to a new file. PerfMon can be configured to do this, but it resets these settings whenever the machine is restarted, which causes hard-to-notice problems down the line.

A coworker has been working with Logman for the last two days trying to create a script to remedy this, which we can then have Windows run as a Scheduled Task on system start. I was just introduced to Logman earlier today. This is what we've got so far:

logman start CounterName -f bin -cnf 00:15:00 -si 05 -v mmddhhmm -o "C:\perflogs\LogName" -cf "C:\perflogs\LogName.config"

This almost works, except that it does not create a new file every 15 minutes (or whatever interval -cnf is set to). I've tried changing "start" to "create counter" (and deleting the existing counter) with similar results -- the PerfMon task will be created but it will only output to a single file and not reflect the -cnf settings anywhere I can determine.

Additionally, the only non-manpage results returned by googling "logman cnf" are unresolved posts by people having the same kind of problem with -cnf. So my question is this: Does Logman's -cnf switch work? Please explain, either way: If it does work, what are we doing wrong? And if it doesn't work, is there a preferred way of creating rolling PerfMon logs?

share|improve this question
up vote 0 down vote accepted

I haven't used -cnf before but I just tried it and it and it seems to work fine.

I used the following:

logman create counter test -f bin -si 01 -cf test.txt -v nnnnnn -cnf 10 -o Blah

logman start test

wait some...

logman stop test

and I had 8 files.

share|improve this answer
Right. I tried out your command, and it worked. Then I tried out my command, exactly as I'd entered it before, and it also worked. As far as I can tell, the machine hasn't been restarted (or even used) since last night so I'm a bit baffled, but I guess the answer to my question is: Yes. -cnf works fine. Off to scratch my head... (Thanks) – Hammer Bro. Apr 8 '11 at 16:12

Your Answer


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.