Windows – Does Logman’s -cnf Switch Work

logmanperfmonwindows

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?

Best Answer

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.