PHPackages                             blacknell/watchdog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. blacknell/watchdog

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

blacknell/watchdog
==================

Simple watchdog to keep a process alive

1.9(4y ago)0153[1 PRs](https://github.com/blacknell/watchdog/pulls)MITPHPCI passing

Since Feb 2Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/blacknell/watchdog)[ Packagist](https://packagist.org/packages/blacknell/watchdog)[ RSS](/packages/blacknell-watchdog/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (4)Versions (15)Used By (0)

Watchdog
========

[](#watchdog)

[![Latest Stable Version](https://camo.githubusercontent.com/3f0c2cc78bbf70727c85c39fc21d4e9d869d15f43a9d4a6269d22df6d611f75e/68747470733a2f2f706f7365722e707567782e6f72672f626c61636b6e656c6c2f7761746368646f672f762f737461626c65)](https://packagist.org/packages/blacknell/watchdog)[![Latest Unstable Version](https://camo.githubusercontent.com/e8a36ed81e449551d0cefd5c4aa2bddb8aad24700709a0dd64fe7bcce6b25b34/68747470733a2f2f706f7365722e707567782e6f72672f626c61636b6e656c6c2f7761746368646f672f762f756e737461626c65)](https://packagist.org/packages/blacknell/watchdog)[![License](https://camo.githubusercontent.com/ca73a5e79fd3eecba6ab524378a0b5739f964e806d18cabe46fdae9100963260/68747470733a2f2f706f7365722e707567782e6f72672f626c61636b6e656c6c2f7761746368646f672f6c6963656e7365)](https://packagist.org/packages/blacknell/watchdog)

A simple watchdog to monitor and keep alive a process. Your process should update a watch file such as `/var/tmp/myprocess.watchdog` at regular intervals. The watchdog checks this is being updated and if not assumes it is hung. The watchdog then attempts to kill any matching prcoesses and restart a new one.

Installation
------------

[](#installation)

Install the latest version with

```
composer require blacknell/watchdog

```

Sample code
-----------

[](#sample-code)

See [example/wrapper.php](https://github.com/blacknell/watchdog/blob/master/example/wrapper.php)

Usage
-----

[](#usage)

Run from within crontab at an interval less frequent than the watchdog file update rate. `*/5 * * * * sudo /usr/bin/php /home/pi/heating/watchdog.php > /dev/null 2>&1`

Logging
-------

[](#logging)

PSR-3 logging is supported via [monolog/monolog](https://github.com/Seldaek/monolog) by passing an optional `Logger` object to the API constructor.

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance58

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~100 days

Recently: every ~51 days

Total

12

Last Release

1591d ago

Major Versions

0.2 → 1.02019-06-06

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8863732?v=4)[Paul Blacknell](/maintainers/blacknell)[@blacknell](https://github.com/blacknell)

---

Top Contributors

[![blacknell](https://avatars.githubusercontent.com/u/8863732?v=4)](https://github.com/blacknell "blacknell (35 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/blacknell-watchdog/health.svg)

```
[![Health](https://phpackages.com/badges/blacknell-watchdog/health.svg)](https://phpackages.com/packages/blacknell-watchdog)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
