summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/index.php14
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;
+ }
+
}
?>
OpenPOWER on IntegriCloud