summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-07 21:19:53 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-07 21:19:53 +0000
commitdf5eae58a19ef929d217ced1a9dbb318acf76e66 (patch)
tree78bdf7efe253e36758c25816be8977969dffbc45 /usr
parent27ce9664a82799de8a22a3b89cfb1a2bb5371ee8 (diff)
downloadpfsense-df5eae58a19ef929d217ced1a9dbb318acf76e66.zip
pfsense-df5eae58a19ef929d217ced1a9dbb318acf76e66.tar.gz
Redirect back to the main status page after 120 updates
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