Reputation: 605
Do you know if there is a way in Windows to count the number of processes running via PHP?
Any help would be greatly appreciated.
Upvotes: 0
Views: 712
Reputation: 548
Yes, with a simple google search you can use this:
http://php.net/manual/en/function.win32-ps-list-procs.php
$processList = win32_ps_list_procs();
if($processList === false) {
// Do error handling here. We use die() for example
die('Failed to obtain the list of processes');
}
$count = count($processList);
Upvotes: 2