Auto-repair corrupted performance counters? Topic is solved

Suggestions around PrimoCache
Bjameson
Level 6
Level 6
Posts: 62
Joined: Mon Nov 08, 2010 12:00 pm

Auto-repair corrupted performance counters?

Post by Bjameson »

Suddenly my L2 cache stopped working. Using PrimoCache 1.0.1 on W8-x64. I found the cause in the PrimoCache log file:

06/02/2014, 16:10:25 Failed to initialize Perf Counter (\Processor(_Total)\% Processor Time) (English)! - Error 0xc0000bb8

Fortunately I found a fix in the PrimoCache Help file: lodctr.exe /r. At first it failed. Ran Chkdsk (no errors). The second lodctr.exe /r succeeded and L2 is working again.

Thanks for your extremely helpful documentation. It appears that Windows occasionally loses its performance counters for no apparent reason and without warning. Your command lodctr.exe /r is also the Microsoft recommended solution. PrimoCache is obviously able to detect the counter failure. So I was wondering if PrimoCache could automatically issue the lodctr.exe /r in cause of trouble? Or, alternatively, report the failure in the Primo GUI. I think it would help a lot of users who suddenly found they had lost their L2.

Thanks and keep up the good work.
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Auto-repair corrupted performance counters?

Post by Support »

Yes, we also plan to add such function to detect if windows performance counter works or not. Thanks.
niels777
Level 1
Level 1
Posts: 4
Joined: Fri Jun 20, 2014 3:49 am

Re: Auto-repair corrupted performance counters?

Post by niels777 »

Hi,

I'm having a related problem using PrimoCache 1.0.1 on W7 x64. My Perf Counters are working fine in perfmon, yet L2 cache on a SSD is not working (I have 52KB L2Storage Write).

Bjameson mentioned a PrimoCache log file, but I can't seem to find it. Where is it located?

Thanks,
Niels
Bjameson
Level 6
Level 6
Posts: 62
Joined: Mon Nov 08, 2010 12:00 pm

Re: Auto-repair corrupted performance counters?

Post by Bjameson »

Hey Niels.

The log file for X64 is usually located at C:\Program Files\PrimoCache\PrimoCcSvc.log - open with Notepad or similar and examine the bottom line. I also had the problem that other programs (such as DriveGleam) could use the counters with no problem while PrimoCache reported a counter failure.

Since the Microsoft-recommended fix worked (as Administrator: lodctr.exe /r) I think it's really a Windows problem and not a Primocache one.
Running lodctr.exe /r will do no harm, so it's safe to just try it. Very stubborn counters can be restarted by rebooting directly after running lodctr.exe /r.

Good luck,
idefix44
Level 8
Level 8
Posts: 137
Joined: Sat Oct 26, 2013 2:13 pm

Re: Auto-repair corrupted performance counters?

Post by idefix44 »

About How to correct corrupt Performance Counters
http://networkadminkb.com/KB/a34/how-to ... nters.aspx

More Information:
Whenever you install a new application that installs performance counters the operating system creates a backup copy of the performance counter registry entries taken prior to the addition of the new application's performance counters file. This backup is saved as a file named PerfStringBackup.ini ONLY if the operating system successfully adds the new application's performance counters. If the application fails to update the performance counters the PerfStringBackup.ini. file is not changed. This process means that PerfStringBackup.ini. is never current, and is always missing the performance counters from the last application to successfully install performance counter. PerfStringBackup.ini is always located in %systemroot%\system32\.

To restore the Performance Counter Information using the PerfStringBackup.ini use the following command
lodctr /R:PerfStringBackup.ini
Note: Running this lodctr command may remove performance counters that were added after the PerfStringBackup.ini backup was created. You may have to reinstall any extensible counters or the programs that installed them.

To manually create a backup of all Performance Counters use the following command
lodctr /S:MyPerfStrBackup.ini
This will create the file MyPerfStrBackup.ini as a backup.

I tried lodctr /R:PerfStringBackup.ini to fix the problem on Windows XP32. Counters restart immediatly... 8-)
tumbleweed
Level 1
Level 1
Posts: 1
Joined: Sun Jun 22, 2014 1:20 pm

Re: Auto-repair corrupted performance counters?

Post by tumbleweed »

The log file for X64 is usually located at C:\Program Files\PrimoCache\PrimoCcSvc.log
I can't seem to find any log file on my system (Win7 x64) anywhere. Is there something I need to do to enable it, or is it only used in case of an error?

Is it really supposed to be under the Program Files directory?
niels777
Level 1
Level 1
Posts: 4
Joined: Fri Jun 20, 2014 3:49 am

Re: Auto-repair corrupted performance counters?

Post by niels777 »

Hi,

Thank you for your answers.

I had checked the C:\Program Files\PrimoCache folder as well as other usual suspects before asking, but couldn't find anything. They are not there in another box running W7 x86 either.

I also rebuilt the counters a few times and nothing changed. They appear to be working fine in other programs, yet L2 refuses to fill up. Could anyone suggest any particular counters I should have a closer look at that Primocache may rely on?

I appreciate your help.
Cheers
Bjameson
Level 6
Level 6
Posts: 62
Joined: Mon Nov 08, 2010 12:00 pm

Re: Auto-repair corrupted performance counters?

Post by Bjameson »

In that case I'm lost too. @Romex, is there a difference between W8-x64 and W7-x64?
I'm using W8-x64 English-US. Below is a screenshot showing the log file in Program Files\PrimoCache. If there is no log file, PrimoCache did not detect any error. Which could mean that in your case, the problem might be something other than the performance counters.
screenshot
screenshot
primocache.png (17.61 KiB) Viewed 14215 times
piquadrat
Level 4
Level 4
Posts: 26
Joined: Wed Jan 22, 2014 7:41 am

Re: Auto-repair corrupted performance counters?

Post by piquadrat »

There is a registry value (not present on default) which prevents PerfLib from disabling counters (for instance if internal checking fails).
To prevent auto disabling counters one has to do the following:
Locate in the registry: HKLM\Software\Microsoft\Windows NT\CurrentVersion\Perflib
Add the following REG_DWORD value: Configuration Flags
Set its value as: 2 (Hexadecimal)
Reboot.
I had problems with loosing counters, found this reg Flags in MS online documentation (http://technet.microsoft.com/en-us/libr ... 10%29.aspx), tried and it worked. No problem since.
niels777
Level 1
Level 1
Posts: 4
Joined: Fri Jun 20, 2014 3:49 am

Re: Auto-repair corrupted performance counters?

Post by niels777 »

Hi,

Just a brief update: I have tried PrimoCache v0.9.2 and L2 seems to be working without any issues (in contrast with v1.0.1). This is consistent with observations made by other posters on this forum.

So at least in some cases Perf Counters do not seem to be the root cause.

Cheers,
Niels
Post Reply