3

I'm setting up my first logman counter. But it's not working! There is some file or folder permissions problem. Or maybe I wrote the create-counter statement wrong.

Here's my counter commands:

logman create counter BillTest -si 30 -v nnnnnn -max 200 -o "C:\Temp" -c "\Processor(*)\*" "\Memory(*)\*" "\LogicalDisk(*)\*"
logman start BillTest

The first command works. It says counter creation successful.

The second command fails:

Collection "BillTest" did not start, check the application event log for any errors

Here's the error in the Event Viewer:

The service was unable to open the log file C:\Temp_000001.blg for log BillTest and will be stopped. Check the log folder for existence, spelling, permissions, and ensure that no other logs or applications are writing to this log file. You can reenter the log file name using the configuration program. This log will not be started. The error returned is: Access is denied.

I verified that C:\Temp exists. I'm not a permissions guru, but I did set all the accounts in the security tab of that folder to "full control." Still, the logman start command failed with the same error.

I noticed that it was trying to write to C:\Temp_000001.blg instead of C:\Temp\000001.blg. That might be part of the problem. So, I tried to update my counter to "C:\Temp\" instead of "C:\Temp", but that failed with a path-invalid error. Also, all the examples I saw online used did not put a trailing slash. So, no dice there.

I tried this on my machine (Windows XP) and my dev server (Windows Server 2003). Both failed with the same error.

How can I fix this?

Bill Paetzke
  • 855
  • 4
  • 12
  • 19

1 Answers1

1

change the -o to be:

-o "c:\temp\mylogdata" It worked on my win 7 system after fixing that

Jim B
  • 23,938
  • 4
  • 35
  • 58
  • That worked! Great! I would still like to understand why. Got any idea? I'm going to try to figure that out right now... – Bill Paetzke Jun 07 '10 at 21:42
  • I suspect it's looking for a full file path when specified but it doesn't say that clearly in the /? text. I'll have to take a look at it later myself. – Jim B Jun 07 '10 at 21:56
  • 7 years after the answer was supplied: http://michaelsync.net/2014/05/07/performance-counters-errors . It seems there is a limitation for starting a capture where a .blg file already exists. –  Aug 17 '17 at 04:50