{"id":13575620,"url":"https://github.com/troglobit/watchdogd","last_synced_at":"2025-04-07T10:25:29.626Z","repository":{"id":989934,"uuid":"797135","full_name":"troglobit/watchdogd","owner":"troglobit","description":"Advanced system monitor \u0026 process supervisor for Linux","archived":false,"fork":false,"pushed_at":"2024-09-02T07:01:46.000Z","size":963,"stargazers_count":192,"open_issues_count":4,"forks_count":40,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-11T02:45:59.937Z","etag":null,"topics":["c","daemon","embedded","isc-license","linux","process-supervisor","watchdog","watchdog-daemon","wdt"],"latest_commit_sha":null,"homepage":"https://troglobit.com/watchdogd.html","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/troglobit.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["troglobit"]}},"created_at":"2010-07-25T21:18:48.000Z","updated_at":"2024-09-10T14:24:44.000Z","dependencies_parsed_at":"2024-01-04T16:49:56.865Z","dependency_job_id":"424ee6a1-b4fe-4107-9173-aac156fce690","html_url":"https://github.com/troglobit/watchdogd","commit_stats":{"total_commits":701,"total_committers":10,"mean_commits":70.1,"dds":0.02853067047075608,"last_synced_commit":"1d0acd1e16b96dc83c45f184e63dfd17687dd097"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Fwatchdogd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Fwatchdogd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Fwatchdogd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Fwatchdogd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/troglobit","download_url":"https://codeload.github.com/troglobit/watchdogd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247633664,"owners_count":20970364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","daemon","embedded","isc-license","linux","process-supervisor","watchdog","watchdog-daemon","wdt"],"created_at":"2024-08-01T15:01:02.651Z","updated_at":"2025-04-07T10:25:29.598Z","avatar_url":"https://github.com/troglobit.png","language":"C","funding_links":["https://github.com/sponsors/troglobit"],"categories":["C","Process control systems","c"],"sub_categories":["Container Runtime Distributions"],"readme":"System \u0026 Process Supervisor for Linux\n=====================================\n[![License Badge][]][License] [![GitHub Status][]][GitHub] [![Coverity Status][]][Coverity Scan]\n\n\u003ca href=\"https://www.clipartof.com/435776\"\u003e\u003cimg align=\"right\" src=\"./doc/logo.png\"\n   alt=\"http://toonclips.com/design/788\" title=\"Copyright © Ron Leishman\"\u003e\u003c/a\u003e\n\nTable of Contents\n-----------------\n\n* [Introduction](#introduction)\n* [Features](doc/features.md)\n  - [Delegating Reboot](doc/features.md#delegating-reboot)\n  - [Built-in Monitors](doc/features.md#built-in-monitors)\n  - [Generic Script](doc/features.md#generic-script)\n  - [Process Supervisor](doc/features.md#process-supervisor)\n* [Advanced Usage](doc/advanced.md)\n  - [Debugging](doc/advanced.md#debugging)\n  - [libwdog API](doc/advanced.md#libwdog-api)\n* [Build \u0026 Install](#build--install)\n* [Contributing](#contributing)\n* [Origin \u0026 References](#origin--references)\n\n\nIntroduction\n------------\n\n[watchdogd(8)][] is an advanced system and process supervisor daemon,\nprimarily intended for embedded Linux and server systems.  By default it\nperiodically kicks the system watchdog timer (WDT) to prevent it from\nresetting the system.  In its more advanced guise it monitors critical\nsystem resources, supervises the heartbeat of processes, records\ndeadline transgressions, and initiates a controlled reset if needed.\n\nWhen a system starts up, `watchdogd` determines the reset cause by\nquerying the kernel.  In case of system reset, and not power loss, the\nreset reason is available already in a file for later analysis by an\noperator or network management system (NMS).  This information in\nturn can be used to put the system in an operational safe state, or\nnon-operational safe state.\n\n\u003e **News:** as of v4.0, multiple watchdog devices are supported.\n\n\n### What is a watchdog timer?\n\nMost server and laptop motherboards today come equipped with a watchdog\ntimer (WDT).  It is a small timer connected to the reset circuitry so\nthat it can reset the board if the timer expires.  The WDT driver, and\nthis daemon, periodically \"kick\" (reset) the timer to prevent it from\nfiring.\n\nMost embedded systems utilize watchdog timers as a way to automatically\nrecover from malfunctions: lock-ups, live-locks, CPU overload.  With a\nbit of logic sprinkled on top the cause can more easily be tracked down.\n\nThe Linux kernel provides a common userspace interface `/dev/watchdog`,\ncreated automatically when the appropriate watchdog driver is loaded.\nIf your board does not have a WDT, the kernel provides a `softdog.ko`\nmodule which in many cases can be good enough.\n\nThe idea of a watchdog daemon in userspace is to run in the background\nof your system.  When there is no more CPU time for the watchdog daemon\nto run it will fail to \"kick\" the WDT.  This will in turn cause the WDT\nto reboot the system.  When it does `watchdogd` has already saved the\nreset reason for your post mortem.\n\nAs a background process, `watchdogd` can of course also be used to\nmonitor other aspects of the system ...\n\n\n### What can watchdogd do?\n\nWithout arguments `watchdogd` runs in the background, monitoring the CPU\nand as long as there is CPU time it \"kicks\" `/dev/watchdog` every 10\nseconds.  If the daemon is stopped, or does not get enough CPU time to\nrun, the underlying WDT hardware will detect this and reboot the system.\nThis is the normal mode of operation.\n\nWith a few lines in [watchdogd.conf(5)][], it can also monitor other\naspects of the system, such as:\n\n- File descriptor leaks\n- File system usage\n- Generic script\n- Load average\n- Memory leaks\n- Process live locks\n- Reset counter, e.g., for snmpEngineBoots (RFC 2574)\n- Temperature\n\nRead more about [Built-in Monitors](doc/features.md#built-in-monitors)\nin the extended documentation.\n\n\nBuild \u0026 Install\n---------------\n\n\u003e **Note:** To enable any of the extra monitors and the process supervisor,\n\u003e see `./configure --help`\n\n`watchdogd` is tailored for Linux systems and builds against most modern\nC libraries.  However, three external libraries are required: [libite][],\n[libuEv][], and [libConfuse][].  Neither should present any surprises,\nall of them use de facto standard `configure` scripts and support\n`pkg-config`.  The latter is used by the `watchdogd` `configure` script\nuse to locate required libraries and header files.\n\nThe common `./configure --some --args --here \u0026\u0026 make` is usually\nsufficient to build `watchdogd`.  But, if libraries are installed in\nnon-standard locations you may need to provide their paths, e.g. with\n`PKG_CONFIG_PATH`.  The following also sets the most common install\nand search paths for the build:\n\n```shell\nPKG_CONFIG_PATH=/opt/lib/pkgconfig:/home/ian/lib/pkgconfig \\\n    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var\nmake\n```\n\nIf you're not building from a released tarball but instead use the GIT\nsources, see the [Contributing](#contributing) section below.\n\n\nContributing\n------------\n\nIf you find bugs or want to contribute fixes or features, check out the\ncode from GitHub:\n\n```shell\ngit clone https://github.com/troglobit/watchdogd\ncd watchdogd\n./autogen.sh\n```\n\nThe `autogen.sh` script runs `autoconf`, `automake`, et al to create the\nconfigure script and such generated files not part of the VCS tree.  For\nmore details, see the file [CONTRIBUTING][contrib] in the GIT sources.\n\n\nOrigin \u0026 References\n-------------------\n\n[watchdogd(8)[] is an improved version of the original, created by\nMichele d'Amico and adapted to [uClinux-dist][] by Mike Frysinger.  It\nis maintained by [Joachim Wiberg][] collaboratively at [GitHub][].\n\nThe [original code][] in uClinux-dist is available in the public domain,\nwhereas this version is distributed under the ISC license.  See the\nfile [LICENSE][] for more details on this.\n\nThe [logo][], \"Watch Dog Detective Taking Notes\", is licensed for use by\nthe `watchdogd` project, copyright © [Ron Leishman][].\n\n\n[uClinux-dist]:      http://www.uclinux.org/pub/uClinux/dist/\n[original code]:     http://www.mail-archive.com/uclinux-dev@uclinux.org/msg04191.html\n[libite]:            https://github.com/troglobit/libite/\n[libuEv]:            https://github.com/troglobit/libuev/\n[libConfuse]:        https://github.com/martinh/libconfuse/\n[License]:           https://en.wikipedia.org/wiki/ISC_license\n[License Badge]:     https://img.shields.io/badge/License-ISC-blue.svg\n[GitHub]:            https://github.com/troglobit/watchdogd/actions/workflows/build.yml/\n[GitHub Status]:     https://github.com/troglobit/watchdogd/actions/workflows/build.yml/badge.svg\n[Coverity Scan]:     https://scan.coverity.com/projects/6458\n[Coverity Status]:   https://scan.coverity.com/projects/6458/badge.svg\n[GitHub]:            http://github.com/troglobit/watchdogd\n[LICENSE]:           https://github.com/troglobit/watchdogd/blob/master/LICENSE\n[contrib]:           https://github.com/troglobit/watchdogd/blob/master/.github/CONTRIBUTING.md\n[Joachim Wiberg]:    http://troglobit.com\n[logo]:              https://www.clipartof.com/435776\n[Ron Leishman]:      http://toonclips.com/design/788\n[watchdogd(8)]:      https://man.troglobit.com/man8/watchdogd.8.html\n[watchdogd.conf(5)]: https://man.troglobit.com/man5/watchdogd.conf.5.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroglobit%2Fwatchdogd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftroglobit%2Fwatchdogd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroglobit%2Fwatchdogd/lists"}