diff options
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/index.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 24154b2..8d65e60 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -215,6 +215,8 @@ echo "<input style='border: 0px solid white;' size='30' name='swapusagemeter' id </html> <?php +$counter = 0; + While(!Connection_Aborted()) { sleep(1); @@ -237,6 +239,18 @@ While(!Connection_Aborted()) { echo "document.forms[0].cpumeter.value = '" . $cpuUsage . "%';\n"; echo "</script>\n"; + /* + * prevent user from running out of ram. + * firefox and ie can be a bear on ram usage! + */ + $counter++; + if($counter > 120) { + echo "Redirecting to <a href=\"status_queues.php\">Main Status</a>.<p>"; + echo "<meta http-equiv=\"refresh\" content=\"1;url=index.php\">"; + mwexec("/usr/bin/killall -9 pfctl"); + exit; + } + } ?> |