星空网 > 软件开发 > 操作系统

(转)Figuring out why my SVCHOST.EXE is at 100% CPU without complicated tools in Windows 7

(转载自: http://www.hanselman.com/blog/FiguringOutWhyMySVCHOSTEXEIsAt100CPUWithoutComplicatedToolsInWindows7.aspx )

 

(转)Figuring out why my SVCHOST.EXE is at 100% CPU without complicated tools in Windows 7images/loading.gif' data-original="http://www.hanselman.com/blog/content/binary/WindowsLiveWriter/Figur.EXEisat100CPUwithoutaMastersDegree_CA31/Windows%20Task%20Manager%20(6)_thumb.png" width="350" height="326" align="right" border="0" />The SvcHost.exe process hosts services that run in the background on Windows. It's literally "Service Host." You may have a dozen services or more running inside that process. More complex is that you'll sometimes see multiple SvcHost.exe's in your TaskManager. 

Let me tell you now, Task Manager will not save you. You can see the PIDs for a running Service for the Services tab, but when a service goes insane, good luck nailing it down.

This inevitably leads you to questions like, "What Services are running inside what SvcHost.exe?" and "Which Service is using 100% CPU."

There's lots of ways to figure this out, but first I'll tell you that simply killing the SvcHost.exe process that is using the most CPU will also kill ALL the other services that were running inside that host process.

There's many command line ways to figure this stuff out, like

net start

or

sc query type= service

or

tasklist /svc

But this post is about doing it the easy way without lining up Process IDs and such.

WHICH SERVICE IS FREAKING OUT?

From the Start Menu, type "Resource Monitor" and run it.

(转)Figuring out why my SVCHOST.EXE is at 100% CPU without complicated tools in Windows 7

Click the checkboxes to the left of each of the svchost.exe processes (or just those that you care about). Now, switch to the CPU tab:

(转)Figuring out why my SVCHOST.EXE is at 100% CPU without complicated tools in Windows 7

See the names of the logical services in the middle pane? Now you can sort by the CPU column and you've got the name of your out of control process.

You can right click and try to stop or restart just the one services, or even use default browser's default search engine to "Search Online" for that service name:

(转)Figuring out why my SVCHOST.EXE is at 100% CPU without complicated tools in Windows 7

This tip has helped me several times while writing and debugging services. Resource Monitor is your friend. Many folks don't' even know it's there!

Enjoy!

 




原标题:(转)Figuring out why my SVCHOST.EXE is at 100% CPU without complicated tools in Windows 7

关键词:Windows

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流