<p>In php, how can I get the number of apache children that are currently available <br>(<code>status = SERVER_READY</code> in the apache scoreboard)?</p>

<p>I'm really hoping there is a simple way to do this in php that I am missing.</p>

You could execute a shell command of
```
ps aux | grep httpd
```
or
```
ps aux | grep apache
```
and count the number of lines in the output.
```
```
exec('ps aux | grep apache', $output);
$processes = count($output);
```
```
I'm not sure which status in the status column indicates that it's ready to accept a connection, but you can filter against that to get a count of ready processes.