I have fixed it by rebuilding the performance counters.
Instructions:
- Set "Disable Performance Counters" to 0 using this command:
Reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance /v "Disable Performance Counters" /t REG_DWORD /d 0
- Rebuild all performance counters:
%windir%\system32\lodctr /R
%windir%\sysWOW64\lodctr /R
When running the first command - %windir%\system32\lodctr /R
, you will get:
Error: Unable to rebuild performance counter setting from system
backup store, error code is 2
In such case, feel free run this command first - %windir%\sysWOW64\lodctr /R
and then run %windir%\system32\lodctr /R
. The second time after this command: %windir%\sysWOW64\lodctr /R
it will complete successfully for %windir%\system32\lodctr /R
:
Info: Successfully rebuilt performance counter setting from system
backup store
- Resync the counters with Windows Management Instrumentation (WMI):
%windir%\system32\wbem\winmgmt.exe /resyncperf
- Stop and restart the Performance Logs and Alerts service with the following commands:
net stop pla
net start pla
- Stop and restart the Windows Management Instrumentation (WMI) service by using these commands:
net stop winmgmt
net start winmgmt
So, the issue is resolved. Thanks.