{"id":127,"date":"2014-05-22T02:42:01","date_gmt":"2014-05-22T02:42:01","guid":{"rendered":"http:\/\/www.torontohelpdesk.ca\/blog\/?p=127"},"modified":"2014-05-22T02:42:01","modified_gmt":"2014-05-22T02:42:01","slug":"killing-a-process-thats-hung","status":"publish","type":"post","link":"https:\/\/www.torontohelpdesk.ca\/blog\/killing-a-process-thats-hung\/","title":{"rendered":"Killing a Process that&#8217;s Hung"},"content":{"rendered":"<p><strong>Problem:<\/strong><\/p>\n<p>You&#8217;re trying to kill a service but it&#8217;s in a permanent state of &#8220;stopping&#8221;<\/p>\n<p><strong>Answer:<\/strong><\/p>\n<p>(h\/t <a href=\"http:\/\/community.spiceworks.com\/how_to\/show\/312-stop-a-hung-service\" target=\"_blank\">Mike Mullen<\/a>)<\/p>\n<div id=\"start_content\" class=\"extra_notes with_steps\">\n<p>If you ever have trouble with a service being stuck in a &#8216;starting&#8217; or &#8216;stopping&#8217; state, you can run a couple of simple commands to kill the service.<\/p>\n<\/div>\n<table>\n<tbody>\n<tr id=\"step_930\">\n<th id=\"1\"><a href=\"http:\/\/community.spiceworks.com\/how_to\/show\/312-stop-a-hung-service#1\">1<\/a>.<\/th>\n<td id=\"step_930_content\" class=\"step_content\">\n<h3>Query the process<\/h3>\n<p>To kill the service you have to know its PID or Process ID. To find this just type the following in at a command prompt:<\/p>\n<p>sc queryex servicename<br \/>\n&lt;Enter&gt;<\/p>\n<p>Replace &#8216;servicename&#8217; with the services registry name. For example: Print Spooler is spooler. (See Picture)<\/td>\n<td class=\"screenshot\">\n<div data-mobile-target=\"attachment_step_930\"><a title=\"1. Query the process\" href=\"http:\/\/community.spiceworks.com\/images\/how_to_steps\/0000\/0866\/Howtotaskkill.png\" rel=\"lightbox[how_to]\"><img decoding=\"async\" class=\"preview\" title=\"Click to view full size.\" src=\"http:\/\/static.spiceworks.com\/images\/how_to_steps\/0000\/0866\/Howtotaskkill_big.png\" alt=\"Howtotaskkill_big\" \/><\/a><\/div>\n<\/td>\n<\/tr>\n<tr id=\"step_931\">\n<th id=\"2\"><a href=\"http:\/\/community.spiceworks.com\/how_to\/show\/312-stop-a-hung-service#2\">2<\/a>.<\/th>\n<td id=\"step_931_content\" class=\"step_content\">\n<h3>Identify the PID<\/h3>\n<p>After running the query you will by presented with a list of details. You will want to locate the PID. (Highlighted)<\/td>\n<td class=\"screenshot\">\n<div data-mobile-target=\"attachment_step_931\"><a title=\"2. Identify the PID\" href=\"http:\/\/community.spiceworks.com\/images\/how_to_steps\/0000\/0868\/Howtotaskkill.png\" rel=\"lightbox[how_to]\"><img decoding=\"async\" class=\"preview\" title=\"Click to view full size.\" src=\"http:\/\/static.spiceworks.com\/images\/how_to_steps\/0000\/0868\/Howtotaskkill_big.png\" alt=\"Howtotaskkill_big\" \/><\/a><\/div>\n<\/td>\n<\/tr>\n<tr id=\"step_932\">\n<th id=\"3\"><a href=\"http:\/\/community.spiceworks.com\/how_to\/show\/312-stop-a-hung-service#3\">3<\/a>.<\/th>\n<td id=\"step_932_content\" class=\"step_content\">\n<h3>Run the Taskkill command<\/h3>\n<p>Now that you have the PID, you can run the following command to kill the hung process:<\/p>\n<p>taskkill \/f \/pid [PID]<br \/>\n&lt;Enter&gt;<\/p>\n<p>This will force kill the hung service. (See Picture)<\/td>\n<td class=\"screenshot\">\n<div data-mobile-target=\"attachment_step_932\"><a title=\"3. Run the Taskkill command\" href=\"http:\/\/community.spiceworks.com\/images\/how_to_steps\/0000\/0870\/Howtotaskkill.png\" rel=\"lightbox[how_to]\"><img decoding=\"async\" class=\"preview\" title=\"Click to view full size.\" src=\"http:\/\/static.spiceworks.com\/images\/how_to_steps\/0000\/0870\/Howtotaskkill_big.png\" alt=\"Howtotaskkill_big\" \/><\/a><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Problem: You&#8217;re trying to kill a service but it&#8217;s in a permanent state of &#8220;stopping&#8221; Answer: (h\/t Mike Mullen) If you ever have trouble with a service being stuck in a &#8216;starting&#8217; or &#8216;stopping&#8217; state, you can run a couple <a class=\"more-link\" href=\"https:\/\/www.torontohelpdesk.ca\/blog\/killing-a-process-thats-hung\/\">Continue reading <span class=\"screen-reader-text\">  Killing a Process that&#8217;s Hung<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[34,82],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-service","tag-process","tag-service"],"_links":{"self":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":1,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"predecessor-version":[{"id":128,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions\/128"}],"wp:attachment":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}