问题
I am stuck badly into this.
I am trying to execute following batch command which runs successfully on my system present on same network as remote server,
typeperf "\192.168.1.247\Processor(_Total)\% Processor Time" -sc 2
But if I try to run the same command on another remote server present on same network,
typeperf "\192.168.1.241\Processor(_Total)\% Processor Time" -sc 2
this gives me Error: No valid counters.
Please let me know what could be the issue and what could be the possible solution to this.
Regards, Suvojit
回答1:
Try refreshing WMI with this command:
winmgmt /resyncperf & wmiadap /f
Make sure that the WMI service is running, or restart it:
net start winmgmt
Run this command to ensure that the disable key doesnt exist, or its value is 0 if it exists.
REG query HKLM\SYSTEM\CurrentControlSet\Services\PerfProc\Performance /v "Disable Performance Counters"
Try rebuilding the performance registry with the LODCTR /R command.
If nothing else works, you can try to manually rebuild Performance Counter library values as a last resort.
来源:https://stackoverflow.com/questions/26258836/typepref-command-gives-no-valid-counters-when-running-remote-command