Svchost.exe Sucks CPU and Rebulding the WMI/WBEM Repository
Lately I've been seeing one particular svchost.exe sucking CPU. There always a number of in-proc running inside of each of the many svchost (Service Host) instances. Using ProcEx, I figured out the PID of the specific instance. Then, I right clicked within ProcEx, hit Properties, and under the Threads tab noticed that wbemcore.dll was working REALLY hard.
Crap, time to re-schmutz WMI's repository. So, I stop WMI from the command line with :
net stop winmgmt
Then I deleted the Repository directory in c:\windows\system32\wbem\ then started again with
net start winmgmt
Then I re-stored/compiled all the .mof (Managed Object Format) files with a batch file containing this one line:
for %%i in (*.mof,*.mfl) do Mofcomp.exe %%i
Now I'm back in business.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Hardware changes? Software changes? Both?
2) It stores all the information about your system (that has chosen to store info in WMI)
3) Dunno, I suspect I installed something that tried to store data in WMI and it went sour. It might also have gone bad since I turned off my machine suddenly one day while it was writing to disk.
Thanks for the post, timely and helpful.
P.S. I just received your new ASP.NET 2.0 book... Starting to churn thru it...
Comments are closed.
1) What is WMI?
2) What function does the repository serve?
3) Why did it freak?