Tuesday, July 18, 2006
« DevUtah Geek Dinner - July 2006 | Main | I look like Julia Roberts? »

I've had an issue on my laptop that's been plaguing me now for about a month, but only today (this evening) have I really had a chance to dive into it and figure out what the problem was.

Almost everytime I would reboot and log in to my machine one process (svchost.exe) would peg the processor at 100% for about 3-4 minutes.  I have a dual-core, so it effectively was pegging my system at 50%, but I still couldn't do too much with one processor being hogged so much.  The crazy thing about this is that it wouldn't happen every time; it was very intermittent.  Even then, it would also occur out of the blue during the normal course of my work.

As any self-respecting Windows developer, I like to have the fantastic Process Explorer as my CTRL+ALT+DEL replacement for viewing processes, threads, memory, and much more.  This tool allows me to double click on the process in question to view information about the process.  Svchost.exe is a special system process that runs Windows Services, so there are many instances of this process on my laptop, each running one or more services.

This particular process, for instance, runs about 24 different services.  I found, by brute force method (e.g. stopping services one by one until the CPU was restored to normal), that the offending service was the Automatic Updates.  Now, I enabled this service long ago (and always have enabled this service) and the issues didn't arise then so it was a bit trickier to nail it down.  I like to have this service running, but not at the cost of losing so much productivity.

NOTE: Earlier I mentioned that I traditionally use Process Explorer to see what services are running in a svchost.exe process.  You can also list services by the following command line:

TASKLIST /SVC
this will list each process and any services running within them

TASKLIST /SVC /FI “PID eq XXXX“
this will list just the services running in the process whose PID is XXXX

PS:  I also just found this blog entry after having written the above post, that I wish I had seen before.  This may very well prove to be helpful in the future.  Thanks, Joel.

Tuesday, July 18, 2006 3:57:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [1]  |  Trackback