devium / processes
This package is used to get a list of running processes on Windows or Unix-like systems, even Darwin
Installs: 23 222
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 0
Forks: 2
pkg:composer/devium/processes
Requires
- php: ^7.3|^8.0
- symfony/process: ^5.0|^6.0|^7.0
Requires (Dev)
- phpunit/phpunit: ^7 || ^8 || ^9
This package is auto-updated.
Last update: 2025-10-29 11:31:56 UTC
README
devium/processes
This package is used to get a list of running processes on Windows or Unix-like systems, even Darwin.
Thanks to fastlist for processes on Windows.
Installation
composer require devium/processes
Usage
use Devium\Processes\Processes; // some PID, integer $pid = 1234; // get all processes except both session leaders, default false $all = true; $processes = new Processes($all); $exists = $processes->exists($pid); // returns true of false $arrayOfProcesses = $processes->get(); // returns array of processes where key is PID // for rescanning processes, call rescan() method $newArrayOfProcesses = $processes->rescan()->get(); // if you only need an array of processes, just use the static asArray(): $listOfProcesses = Processes::asArray();
Structure of processes array
For windows
{
"PID": {
"pid": "integer",
"ppid": "integer",
"name": "string"
}
}
For unix-like systems
{
"PID": {
"pid": "integer",
"ppid": "integer",
"name": "string",
"uid": "integer",
"cpu": "float",
"memory": "float",
"cmd": "string"
}
}
Testing
composer test
License
devium/processes is open-sourced software licensed under the MIT license.
Made with ❤️ in Ukraine