PHPackages                             derywat/php-processes-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. derywat/php-processes-watchdog

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

derywat/php-processes-watchdog
==============================

Process manager and watchdog for derywat/php-processes.

0.1.0(6mo ago)023MITPHP

Since Dec 11Pushed 6mo agoCompare

[ Source](https://github.com/derywat/php-processes-watchdog)[ Packagist](https://packagist.org/packages/derywat/php-processes-watchdog)[ RSS](/packages/derywat-php-processes-watchdog/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

Process manager and watchdog for derywat/php-processes.
=======================================================

[](#process-manager-and-watchdog-for-derywatphp-processes)

Provides methods for managing processes collection.

Starting processes
------------------

[](#starting-processes)

Process starts by calling addProcess method on watchdog instance (singleton).
Multiple processes can be started anytime instance exists. Process will be restarted automatically if in case of exit without using removeProcess method.

```
use derywat\processesWatchdog\ProcessesWatchdog;

$processes = ProcessesWatchdog::getInstance();

$restartWaitSeconds = 30;

$processes->addProcess(
	'uniqueProcessNameOrId',
	function($socket){
	//child process code
	},
	$restartWaitSeconds
);
```

Handling interprocess messaging
-------------------------------

[](#handling-interprocess-messaging)

By default process end messages are filtered out in processMessages methods result. To include process end messages call processMessages() with parameter equal true.

```
use derywat\processesWatchdog\ProcessesWatchdog;

$processes = ProcessesWatchdog::getInstance();

$messages = $processes->processMessages();
if(!empty($messages)){
	//handle messages here
}
```

Ending processes
----------------

[](#ending-processes)

Process is scheduled for ending and termination signal is send to process by calling removeProcess method. Process finished message is sent on process end.

```
use derywat\processesWatchdog\ProcessesWatchdog;

$processes = ProcessesWatchdog::getInstance();

$processes->removeProcess('uniqueProcessNameOrId');
```

Ending all managed processes and waiting for finish
---------------------------------------------------

[](#ending-all-managed-processes-and-waiting-for-finish)

```
use derywat\processesWatchdog\ProcessesWatchdog;

$processes = ProcessesWatchdog::getInstance();

$processes->removeAllProcesses();
while(!$processes->allProcessesEnded()){
	$processes->processAndHandleMessages($messagesHandler);
	usleep(100000);
}
```

Watchdog events
---------------

[](#watchdog-events)

Watchdog sends events on start, stop, scheduled restart and restart of process. Event object is of class ProcessesWatchdogEvent.

```
use derywat\processesWatchdog\ProcessesWatchdog;

$processes = ProcessesWatchdog::getInstance();

$processes->registerEventReceiver((new EventsReceiver())->addEventHandlerClosure(
	function(ProcessesWatchdogEvent $event) use ($logger) {
		$message = $event->getMessage();
		$actionId = $event->getAction();
		$actionName = $event->getgetActionName();
		//watchdog event handling code
	}
));
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance66

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

204d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46571114?v=4)[derywat](/maintainers/derywat)[@derywat](https://github.com/derywat)

---

Top Contributors

[![derywat](https://avatars.githubusercontent.com/u/46571114?v=4)](https://github.com/derywat "derywat (1 commits)")

### Embed Badge

![Health badge](/badges/derywat-php-processes-watchdog/health.svg)

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

###  Alternatives

[stolz/assets

An ultra-simple-to-use assets management library

289531.9k8](/packages/stolz-assets)[alibabacloud/dysmsapi-20170525

Alibaba Cloud Dysmsapi (20170525) SDK Library for PHP

13449.4k40](/packages/alibabacloud-dysmsapi-20170525)[lampjunkie/php-datatables

PHP Library for (http://www.datatables.net)

5717.6k](/packages/lampjunkie-php-datatables)[julien731/wp-review-me

A lightweight library to help you get more reviews for your WordPress theme/plugin

355.6k](/packages/julien731-wp-review-me)

PHPackages © 2026

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