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. blacknell/watchdog

ActiveLibrary

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 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (4)Versions (14)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

38

—

LowBetter than 84% of packages

Maintenance57

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

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

1546d ago

Major Versions

0.2 → 1.02019-06-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/42e42d077b60ac57c4a4c4c12023a2b6228370f6de5ebd650e819724d91d1f7b?d=identicon)[blacknell](/maintainers/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

[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k3](/packages/elgg-elgg)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M385](/packages/shopware-core)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[drevops/git-artifact

Package artifact from your codebase in CI and push it to a separate git repo.

2133.2k](/packages/drevops-git-artifact)[doppar/framework

The Doppar Framework

366.7k8](/packages/doppar-framework)

PHPackages © 2026

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