<?php
$content = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html><head>
<title>Apache Status</title>
</head><body>
<h1>Apache Server Status for localhost (via 127.0.0.1)</h1>
<dl><dt>Server Version: Apache/2.4.63 (Win64) OpenSSL/3.4.0</dt>
<dt>Server MPM: WinNT</dt>
<dt>Apache Lounge VS17 Server built: Jan 22 2025 09:55:33
</dt></dl><hr /><dl>
<dt>Current Time: Tuesday, 15-Apr-2025 22:55:26 Áåëàðóñü (çèìà)</dt>
<dt>Restart Time: Tuesday, 15-Apr-2025 22:17:31 Áåëàðóñü (çèìà)</dt>
<dt>Parent Server Config. Generation: 1</dt>
<dt>Parent Server MPM Generation: 0</dt>
<dt>Server uptime: 37 minutes 54 seconds</dt>
<dt>Server load: -1.00 -1.00 -1.00</dt>
<dt>Total accesses: 336 - Total Traffic: 1.1 MB - Total Duration: 519</dt>
<dt>.148 requests/sec - 522 B/second - 3535 B/request - 1.54464 ms/request</dt>
<dt>1 requests currently being processed, 0 workers gracefully restarting, 127 idle workers</dt>
</dl><pre>________________________________________________________________
_______________________________________________________________W
</pre>
<p>Scoreboard Key:<br />
"<b><code>_</code></b>" Waiting for Connection,
"<b><code>S</code></b>" Starting up,
"<b><code>R</code></b>" Reading Request,<br />
"<b><code>W</code></b>" Sending Reply,
"<b><code>K</code></b>" Keepalive (read),
"<b><code>D</code></b>" DNS Lookup,<br />
"<b><code>C</code></b>" Closing connection,
"<b><code>L</code></b>" Logging,
"<b><code>G</code></b>" Gracefully finishing,<br />
"<b><code>I</code></b>" Idle cleanup of worker,
"<b><code>.</code></b>" Open slot with no current process<br />
</p>
<table border="0"><tr><th>Srv</th><th>PID</th><th>Acc</th><th>M</th><th>SS</th><th>Req</th><th>Dur</th><th>Conn</th><th>Child</th><th>Slot</th><th>Client</th><th>Protocol</th><th>VHost</th><th>Request</th></tr>
<tr><td><b>0-0</b></td><td>10576</td><td>128/336/336</td><td><b>W</b>
</td><td>0</td><td>0</td><td>519</td><td>446.4</td><td>1.13</td><td>1.13
</td><td>127.0.0.1</td><td>http/1.1</td><td nowrap>default:80</td><td nowrap>GET /openserver/server-status HTTP/1.1</td></tr>
</table>
<hr /> <table>
<tr><th>Srv</th><td>Child Server number - generation</td></tr>
<tr><th>PID</th><td>OS process ID</td></tr>
<tr><th>Acc</th><td>Number of accesses this connection / this child / this slot</td></tr>
<tr><th>M</th><td>Mode of operation</td></tr>
<tr><th>SS</th><td>Seconds since beginning of most recent request</td></tr>
<tr><th>Req</th><td>Milliseconds required to process most recent request</td></tr>
<tr><th>Dur</th><td>Sum of milliseconds required to process all requests</td></tr>
<tr><th>Conn</th><td>Kilobytes transferred this connection</td></tr>
<tr><th>Child</th><td>Megabytes transferred this child</td></tr>
<tr><th>Slot</th><td>Total megabytes transferred this slot</td></tr>
</table>
<hr>
<table cellspacing=0 cellpadding=0>
<tr><td bgcolor="#000000">
<b><font color="#ffffff" face="Arial,Helvetica">SSL/TLS Session Cache Status:</font></b>
</td></tr>
<tr><td bgcolor="#ffffff">
cache type: <b>SHMCB</b>, shared memory: <b>524288</b> bytes, current entries: <b>0</b><br>subcaches: <b>32</b>, indexes per subcache: <b>91</b><br>index usage: <b>0%</b>, cache usage: <b>0%</b><br>total entries stored since starting: <b>0</b><br>total entries replaced since starting: <b>0</b><br>total entries expired since starting: <b>0</b><br>total (pre-expiry) entries scrolled out of the cache: <b>0</b><br>total retrieves since starting: <b>0</b> hit, <b>0</b> miss<br>total removes since starting: <b>0</b> hit, <b>0</b> miss<br></td></tr>
</table>
</body></html>
';
// Total Traffic: 1.1 MB
if (preg_match('/Total Traffic: ([0-9.]+)\s+([a-zA-Z])/', $content, $matches)) {
print_r($matches);
}
- Output for 8.2.0 - 8.2.28, 8.3.0 - 8.3.20, 8.4.1 - 8.4.6
- Array
(
[0] => Total Traffic: 1.1 M
[1] => 1.1
[2] => M
)
preferences:
43.25 ms | 406 KiB | 5 Q