{"id":88719,"date":"2026-04-22T14:23:10","date_gmt":"2026-04-22T14:23:10","guid":{"rendered":"https:\/\/christiancorner.us\/index.php\/2026\/04\/22\/i-installed-this-linux-watchdog-and-now-my-system-auto-reboots-when-locked-2\/"},"modified":"2026-04-22T14:33:34","modified_gmt":"2026-04-22T14:33:34","slug":"i-installed-this-linux-watchdog-and-now-my-system-auto-reboots-when-locked-2","status":"publish","type":"post","link":"https:\/\/christiancorner.us\/index.php\/2026\/04\/22\/i-installed-this-linux-watchdog-and-now-my-system-auto-reboots-when-locked-2\/","title":{"rendered":"I installed this Linux &#8216;watchdog&#8217; and now my system auto-reboots when locked"},"content":{"rendered":"<p>\n<\/p>\n<div>\n<figure class=\"c-shortcodeImage u-clearfix c-shortcodeImage-large\">\n<div class=\"c-shortcodeImage_imageContainer\">\n<div class=\"c-shortcodeImage_image\"><picture class=\"c-cmsImage c-cmsImage_loaded\" style=\"aspect-ratio:1280\/914.375;\"><source media=\"(max-width: 767px)\" srcset=\"https:\/\/www.zdnet.com\/a\/img\/resize\/2b1362f2bd7d23d9cddd2406dfee374146702b6e\/2026\/04\/22\/5bc3d598-791e-48d9-ba7f-c3b76e351e00\/gettyimages-1336478011.jpg?auto=webp&amp;width=768\" alt=\"3d rendering of a futuristic mechanical dog stuffed toy in a dark black background with a effect of boom for the purpose of advertisement and commercial use\"\/><source media=\"(max-width: 1023px)\" srcset=\"https:\/\/www.zdnet.com\/a\/img\/resize\/8e9c8872cfdca0487d3306b727b9e12d0a5abbb1\/2026\/04\/22\/5bc3d598-791e-48d9-ba7f-c3b76e351e00\/gettyimages-1336478011.jpg?auto=webp&amp;width=1024\" alt=\"3d rendering of a futuristic mechanical dog stuffed toy in a dark black background with a effect of boom for the purpose of advertisement and commercial use\"\/><source media=\"(max-width: 1440px)\" srcset=\"https:\/\/www.zdnet.com\/a\/img\/resize\/092be43f38383b0f8ae5c449932eaa7368c4b8e7\/2026\/04\/22\/5bc3d598-791e-48d9-ba7f-c3b76e351e00\/gettyimages-1336478011.jpg?auto=webp&amp;width=1280\" alt=\"3d rendering of a futuristic mechanical dog stuffed toy in a dark black background with a effect of boom for the purpose of advertisement and commercial use\"\/><\/picture><\/div>\n<p> <!----><\/div><figcaption> <span class=\"c-shortcodeImage_credit g-outer-spacing-top-xsmall u-block\">AssasinatorCzar via iStock\/Getty Images Plus<\/span><\/figcaption><\/figure>\n<p><em>Follow ZDNET: <\/em><span class=\"c-commerceLink\"><a rel=\"noopener nofollow sponsored\" target=\"_blank\" href=\"https:\/\/cc.zdnet.com\/v1\/otc\/00hQi47eqnEWQ6T9d4QLBUc?element=BODY&amp;element_label=Add+us+as+a+preferred+Google+source&amp;module=LINK&amp;object_type=text-link&amp;object_uuid=5e5d2e64-4b30-43e6-8555-26eac7e449f3&amp;position=1&amp;template=article&amp;track_code=__COM_CLICK_ID__&amp;url=https%3A%2F%2Fwww.google.com%2Fpreferences%2Fsource%3Fq%3Dzdnet.com&amp;view_instance_uuid=379e95d2-6b56-476b-a90b-043a8dd63bd3\"><span>Add us as a favorite source<\/span><!----><\/a><\/span><em>    On Google.<\/em><\/p>\n<hr\/>\n<h3>    ZDNET Key Takeaways <\/h3>\n<ul>\n<li>If your Linux system locks up, it may need to reboot.<\/li>\n<li>This can be automated with the help of a small application.<\/li>\n<li>Watchdog is easy to install and free to use.<\/li>\n<\/ul>\n<hr\/>\n<p>I have several Linux systems connected to my home lab; Some of them are desktop, and some of them are server. Ninety-nine percent of the time, those machines work flawlessly. When that one percent happens, any machine going south needs help.<\/p>\n<p>One way to help is through a small software package called Watchdog. This part of the software runs various checks to see if the hardware is &#8220;locked up.&#8221; If it detects that this has happened, it will reboot the machine. <\/p>\n<p><strong>Too: <\/strong><strong>6 reasons why a minimal Linux install might be the smartest move you&#8217;ve made<\/strong><\/p>\n<p>There are two types of watchdogs: software and hardware. Hardware Watchdog is more reliable, but it requires specialized hardware to work. Software Watchdog is not as reliable, but it works on most Linux systems. <\/p>\n<h2>How does a watchdog work?<\/h2>\n<p>A kernel module (Softdog), together with the watchdog service, watches the system with a countdown timer. <\/p>\n<ul>\n<li>A virtual device has been created (\/dev\/watchDog).<\/li>\n<li>If the virtual device is &#8220;kicked&#8221; by a process, the timer is reset.<\/li>\n<li>If the virtual device is not &#8220;kicked&#8221; by any process, the watchdog reboots the system.<\/li>\n<\/ul>\n<p>It&#8217;s simple in theory, but its foundation is much more complex. Luckily, as a user, you don&#8217;t have to dig too deep to find out the essence of Watchdog. <\/p>\n<p><strong>Also: The First 8 Linux Commands Every New User Should Learn<\/strong><\/p>\n<p>Although Watchdog may be necessary for servers (especially those that do not have a monitor, keyboard, or mouse connected), it can also be useful for desktops. For example, let&#8217;s say you need to log into a Linux machine on your home network from work. If that machine is locked, you will not be able to access it. If that machine is monitored by Watchdog, it will reboot, and you will be able to access it. <\/p>\n<p>This can be very useful. <\/p>\n<p>You might think that setting up Watchdog is hard, but you&#8217;ll be surprised that it&#8217;s not that big of a challenge, even if you&#8217;re just starting out with Linux. <\/p>\n<p><strong>Also: My 5 Linux Commands for Troubleshooting \u2013 and How I Use Them<\/strong><\/p>\n<p>Let me show you how it&#8217;s done. <\/p>\n<h2>    How to install watchdog<\/h2>\n<p><strong>what you&#8217;ll need: <\/strong>I&#8217;m going to demonstrate this on a machine running Ubuntu 24.04. Watchdog is found in the standard Ubuntu repositories (as well as the Fedora standard repositories). For Arch users, you will need to use yay to install this software. You will also need a user with sudo privileges. <\/p>\n<div id=\"77bc6560-1793-4810-8a8d-1ded8a71e4e0\" class=\"c-shortcodeListicle g-outer-spacing-bottom-medium\">\n<div class=\"c-shortcodeListicle_conten\"><!----> <!----> <\/p>\n<div class=\"c-shortcodeListicle_dek\">\n<div class=\"c-ShortcodeContent\">\n<p>The first thing to do is install watchdog, which can be done with the command:<\/p>\n<\/div>\n<\/div>\n<p> <a rel=\"nofollow\" target=\"_blank\" data-cy=\"infoCard_showMore\" class=\"c-shortcodeInfocard-faq-showMore\"><\/p>\n<p>        show more<br \/>\n      <\/a> <!----><\/div>\n<p> <!----> <!----><\/div>\n<blockquote>\n<p><em>sudo apt-get install watchdog -y<\/em><\/p>\n<\/blockquote>\n<p>If you&#8217;re using a Fedora-based machine, the command is: <\/p>\n<blockquote>\n<p><em>sudo dnf install watchdog -y<\/em><\/p>\n<\/blockquote>\n<p>For Arch, it is: <\/p>\n<blockquote>\n<p><em>wow -s sentinel<\/em><\/p>\n<\/blockquote>\n<div id=\"4b793f05-0cdc-4b74-af25-74f6225aac65\" class=\"c-shortcodeListicle g-outer-spacing-bottom-medium\">\n<div class=\"c-shortcodeListicle_conten\"><!----> <!----> <\/p>\n<div class=\"c-shortcodeListicle_dek\">\n<div class=\"c-ShortcodeContent\">\n<p>After Watchdog is installed, you need to load the Softdog kernel module, which is done with:<\/p>\n<\/div>\n<\/div>\n<p> <a rel=\"nofollow\" target=\"_blank\" data-cy=\"infoCard_showMore\" class=\"c-shortcodeInfocard-faq-showMore\"><\/p>\n<p>        show more<br \/>\n      <\/a> <!----><\/div>\n<p> <!----> <!----><\/div>\n<blockquote>\n<p><em>sudo modprobe softdog<\/em><\/p>\n<\/blockquote>\n<p>Verify that the module is loaded with: <\/p>\n<blockquote>\n<p><em>LSMOD | Grape Softdog<\/em><\/p>\n<\/blockquote>\n<p>If you see Softdog listed, it has loaded successfully. <\/p>\n<p><strong>Also: Best Linux Laptops in 2026: Expert-Tested for Students, Hobbyists, and Professionals<\/strong><\/p>\n<p>Check to make sure the device node exists with: <\/p>\n<blockquote>\n<p><em>ls -la \/dev\/watchdog<\/em><\/p>\n<\/blockquote>\n<div id=\"041b0fca-18f3-4fc9-a0c8-19d76efeb4b8\" class=\"c-shortcodeListicle g-outer-spacing-bottom-medium\">\n<div class=\"c-shortcodeListicle_conten\"><!----> <!----> <\/p>\n<div class=\"c-shortcodeListicle_dek\">\n<div class=\"c-ShortcodeContent\">\n<p>You also need to load the watchdog kernel module on boot. If you don&#8217;t do this, the service will not run after a reboot (so it won&#8217;t be able to see the system). This is done with:<\/p>\n<\/div>\n<\/div>\n<p> <a rel=\"nofollow\" target=\"_blank\" data-cy=\"infoCard_showMore\" class=\"c-shortcodeInfocard-faq-showMore\"><\/p>\n<p>        show more<br \/>\n      <\/a> <!----><\/div>\n<p> <!----> <!----><\/div>\n<figure class=\"c-shortcodeImage u-clearfix c-shortcodeImage-large c-shortcodeImage-hasCaption\">\n<div class=\"c-shortcodeImage_imageContainer\">\n<div class=\"c-shortcodeImage_image\"><picture class=\"c-cmsImage\" style=\"aspect-ratio:1280\/172.3076923076923;\"><!----> <img decoding=\"async\" src=\"\" alt=\"Supervision\" width=\"1280\" height=\"172.3076923076923\" fetchpriority=\"low\"\/><\/picture><\/div>\n<\/p><\/div><figcaption>\n<div class=\"c-shortcodeImage_caption g-inner-spacing-right-small g-color-black\">\n<div class=\"c-ShortcodeContent\">\n<p>Make sure this command is typed correctly.<\/p>\n<\/div>\n<\/div>\n<p> <span class=\"c-shortcodeImage_credit g-outer-spacing-top-xsmall u-block\">Jack WallenZDNET<\/span><\/figcaption><\/figure>\n<p>You are now ready to configure Watchdog. <\/p>\n<h2>How to configure watchdog <\/h2>\n<p>With watchdog running, you&#8217;ll want to make sure that the configuration file is set up such that it will actually do what it&#8217;s supposed to do. This is done through a configuration file. Open that file with the command: <\/p>\n<blockquote>\n<p><em>sudo nano \/etc\/watchDog.conf<\/em><\/p>\n<\/blockquote>\n<p>In that file, look for the following lines (they are not found consecutively in the file): <\/p>\n<blockquote>\n<p># watchdog-device=\/dev\/watchdog \t<\/p>\n<p># interval = 1 \t<\/p>\n<p># watchdog-timeout = 20 # Time in seconds before reboot \t<\/p>\n<p># real time = yes \t<\/p>\n<p># priority = 1 \t<\/p>\n<p># max-load-1 = 24 \t<\/p>\n<p># max-load-5 = 18 \t<\/p>\n<p># max-load-15 = 12 \t<\/p>\n<p># min-memory = 1 \t<\/p>\n<\/blockquote>\n<p>You need to remove the # and spaces before each line. Note: If you don&#8217;t see <em>watchdog-timeout=20<\/em> line, add it manually. <\/p>\n<p>Save and close the file. <\/p>\n<p>You will then need to start and enable the service with the command: <\/p>\n<blockquote>\n<p><em>sudo systemctl enable&#8211;now watchdog<\/em><\/p>\n<\/blockquote>\n<p>Watchdog is now running in the background and will do its job if something goes wrong. <\/p>\n<p><strong>Too: <\/strong><strong>You Can Use Linux 7.0 on These 7 Distros Today \u2013 Here&#8217;s What to Expect<\/strong><\/p>\n<p>If you want to check whether the watchdog is working, you can manually cause a kernel panic with the following three commands: <\/p>\n<blockquote>\n<p>sudo sysctl -w kernel.sysrq=1 \t<\/p>\n<p>sudo su &#8211; \t<\/p>\n<p>echo C > \/proc\/sysrq-trigger \t<\/p>\n<\/blockquote>\n<p>The system will become unresponsive, and Watchdog should reboot it. <\/p>\n<h2>    hardware method <\/h2>\n<p>If you have a hardware watchdog, systemd can be configured to kick it in and enforce a reboot. Here&#8217;s how you configure it. <\/p>\n<p>Open the systemd config file with: <\/p>\n<blockquote>\n<p>sudo nano \/etc\/systemd\/system.conf \t<\/p>\n<\/blockquote>\n<p>Find the following lines: <\/p>\n<blockquote>\n<p><em>#RuntimeWatchDogSec=0<\/em><\/p>\n<p><em>#rebootwatchdogssec=10min<\/em><\/p>\n<p><em>#watchdogdevice=<\/em><\/p>\n<\/blockquote>\n<p>Change those lines to: <\/p>\n<blockquote>\n<p><em>runtimewatchdogsec=30<\/em><\/p>\n<p><em>rebootwatchdogsec=10min<\/em><\/p>\n<p><em>watchdogdevice=\/dev\/watchdog<\/em><\/p>\n<\/blockquote>\n<p>Save and close the file. <\/p>\n<p><strong>Also: My proven way to speed up Linux when upgrading RAM isn&#8217;t worth it (and it&#8217;s free to do)<\/strong><\/p>\n<p>Restart the systemd daemon with: <\/p>\n<blockquote>\n<p><em>sudo systemctl daemon-reload<\/em><\/p>\n<\/blockquote>\n<p>And there you have it. You now have a service that is monitoring your system and will reboot it if things go wrong. <\/p>\n<\/div>\n<p><script type=\"text\/javascript\">\n      (function() {\n        window.zdconsent = window.zdconsent || {run:(),cmd:(),useractioncomplete:(),analytics:(),functional:(),social:()};\n        window.zdconsent.cmd = window.zdconsent.cmd || ();\n        window.zdconsent.cmd.push(function() {\n          !function(f,b,e,v,n,t,s)\n          {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n          n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n          if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n          n.queue=();t=b.createElement(e);t.async=!0;\n          t.src=v;s=b.getElementsByTagName(e)(0);\n          s.parentNode.insertBefore(t,s)}(window, document,'script',\n          'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n          fbq('set', 'autoConfig', false, '789754228632403');\n          fbq('init', '789754228632403');\n        });\n      })();\n    <\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AssasinatorCzar via iStock\/Getty Images Plus Follow ZDNET: Add us as a favorite source On Google. ZDNET Key Takeaways If your Linux system locks up, it may need to reboot. This can be automated with the help of a small application. Watchdog is easy to install and free to use. I have several Linux systems connected<\/p>\n","protected":false},"author":1,"featured_media":88746,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[24422,5997,16869,8906,217,2684],"class_list":{"0":"post-88719","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-devotionals","8":"tag-autoreboots","9":"tag-installed","10":"tag-linux","11":"tag-locked","12":"tag-system","13":"tag-watchdog"},"_links":{"self":[{"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/posts\/88719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/comments?post=88719"}],"version-history":[{"count":1,"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/posts\/88719\/revisions"}],"predecessor-version":[{"id":88749,"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/posts\/88719\/revisions\/88749"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/media\/88746"}],"wp:attachment":[{"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/media?parent=88719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/categories?post=88719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/christiancorner.us\/index.php\/wp-json\/wp\/v2\/tags?post=88719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}