Belirli bir anda Apache çalışma isteği almak nasıl?

0 Cevap php

I need to find a way to get all Apache running request at a given moment. I need to list the vhost, cpu, request ip address and some other information. This information will be consumed by a PHP script.

I mod_status yüklü ve ben gereken tüm bilgileri var. Yani sunucusu (http://localhost/server-status) bir istek üreten, rapor almak için file_get_contents kullanmaya çalıştı. Bu mükemmel çalıştı. Sonra simplexml_load_string kullanarak XML dönüştürerek, raporunu ayrıştırmak için çalıştı. Sorun mod_status tarafından çıkarılan HTML iyi oluşturulmuş olmasıdır.

İşte ayrıştırmak gerekir tablodan HTL olduğunu:

<table border="0"><tr><th>Srv</th><th>PID</th><th>Acc</th><th>M</th><th>CPU
</th><th>SS</th><th>Req</th><th>Conn</th><th>Child</th><th>Slot</th><th>Client</th><th>VHost</th><th>Request</th></tr>

<tr><td><b>0-1</b></td><td>-</td><td>0/0/70</td><td>.
</td><td>0.00</td><td>107</td><td>0</td><td>0.0</td><td>0.00</td><td>0.34
</td><td>127.0.0.1</td><td nowrap>zsce</td><td nowrap>OPTIONS * HTTP/1.0</td></tr>

<tr><td><b>1-1</b></td><td>-</td><td>0/0/55</td><td>.
</td><td>0.04</td><td>108</td><td>0</td><td>0.0</td><td>0.00</td><td>0.70
</td><td>127.0.0.1</td><td nowrap>zsce</td><td nowrap>OPTIONS * HTTP/1.0</td></tr>

</table>

I'm sure someone has tried to do something like this before. 1) Is there another way to access the information I need? 2) Has anybody tried other tools / modules?

Şimdiden teşekkürler.

0 Cevap