{"id":8647,"date":"2025-02-16T20:26:35","date_gmt":"2025-02-16T19:26:35","guid":{"rendered":"https:\/\/shakti.tattva.se\/?p=8647"},"modified":"2025-02-16T20:26:35","modified_gmt":"2025-02-16T19:26:35","slug":"linux-suspend-process","status":"publish","type":"post","link":"https:\/\/shakti.tattva.se\/index.php\/linux-suspend-process\/","title":{"rendered":"Linux: Suspend process"},"content":{"rendered":"<p>Yes, you can suspend a process in Linux to stop it from using the CPU:<\/p>\n<h3><strong>1. Suspend (SIGSTOP) and Resume (SIGCONT)<\/strong><\/h3>\n<ul>\n<li>Find the process ID (PID):\n<pre><code class=\"language-bash\">pidof process_name\r\n<\/code><\/pre>\n<\/li>\n<li>Suspend the process:\n<pre><code class=\"language-bash\">kill -STOP &lt;PID&gt;\r\n<\/code><\/pre>\n<\/li>\n<li>Resume the process:\n<pre><code class=\"language-bash\">kill -CONT &lt;PID&gt;\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3><strong>2. Suspend Using <code>killall<\/code> (by name)<\/strong><\/h3>\n<pre><code class=\"language-bash\">killall -STOP process_name\r\nkillall -CONT process_name\r\n<\/code><\/pre>\n<h3><strong>3. Suspend a Foreground Process (<code>Ctrl+Z<\/code>)<\/strong><\/h3>\n<p>If the process is running in the foreground, press <code>Ctrl+Z<\/code> to suspend it, then use <code>bg<\/code> or <code>fg<\/code> to resume.<\/p>\n<p>Would you like an automatic way to suspend and resume processes at intervals?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yes, you can suspend a process in Linux to stop it from using the CPU: 1. Suspend (SIGSTOP) and Resume (SIGCONT) Find the process ID (PID): pidof process_name Suspend the process: kill -STOP &lt;PID&gt; Resume the process: kill -CONT &lt;PID&gt; 2. Suspend Using killall (by name) killall -STOP process_name killall -CONT process_name 3. Suspend a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_kad_post_transparent":"default","_kad_post_title":"default","_kad_post_layout":"default","_kad_post_sidebar_id":"","_kad_post_content_style":"default","_kad_post_vertical_padding":"default","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8647","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts\/8647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/comments?post=8647"}],"version-history":[{"count":1,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts\/8647\/revisions"}],"predecessor-version":[{"id":8648,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts\/8647\/revisions\/8648"}],"wp:attachment":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/media?parent=8647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/categories?post=8647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/tags?post=8647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}