diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-03-07 21:19:53 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-03-07 21:19:53 +0000 |
commit | df5eae58a19ef929d217ced1a9dbb318acf76e66 (patch) | |
tree | 78bdf7efe253e36758c25816be8977969dffbc45 /usr/local | |
parent | 27ce9664a82799de8a22a3b89cfb1a2bb5371ee8 (diff) | |
download | pfsense-df5eae58a19ef929d217ced1a9dbb318acf76e66.zip pfsense-df5eae58a19ef929d217ced1a9dbb318acf76e66.tar.gz |
Redirect back to the main status page after 120 updates
Diffstat (limited to 'usr/local')
-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; + } + } ?> |