diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-03-06 03:51:46 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-03-06 03:51:46 +0000 |
commit | 75333cf97568bd87ccbbb0d276ff3085bb22cd6a (patch) | |
tree | 3ac2692b67806dc9d383ad100b8ea05f208ba7de /usr/local/www/firewall_shaper_queues.php | |
parent | 5de92d20adbde90d76327381652747012c1db62c (diff) | |
download | pfsense-75333cf97568bd87ccbbb0d276ff3085bb22cd6a.zip pfsense-75333cf97568bd87ccbbb0d276ff3085bb22cd6a.tar.gz |
Recover from hung pfctl
Diffstat (limited to 'usr/local/www/firewall_shaper_queues.php')
-rwxr-xr-x | usr/local/www/firewall_shaper_queues.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr/local/www/firewall_shaper_queues.php b/usr/local/www/firewall_shaper_queues.php index cfe58f7..4f0adf9 100755 --- a/usr/local/www/firewall_shaper_queues.php +++ b/usr/local/www/firewall_shaper_queues.php @@ -196,9 +196,10 @@ if ($_GET['act'] == "del") { </body> </html> - <?php +sleep(3); + $counter = 0; While(!Connection_Aborted()) { @@ -213,10 +214,16 @@ While(!Connection_Aborted()) { $i = 0; foreach($stats_array as $stats_line) { + if($stat_line_split[2] == "" and $counter > 1) { + mwexec("/usr/bin/killall -9 pfctl php"); + exit; + } + $stat_line_split = split("\|", $stats_line); $packet_sampled = intval($stat_line_split[2]); $speed = $stat_line_split[1]; $borrows = intval($stat_line_split[3]); + echo "<script language='javascript'>\n"; $packet_s = round(100 * (1 - $packet_sampled / $total_packets_s), 0); @@ -236,7 +243,7 @@ While(!Connection_Aborted()) { * firefox and ie can be a bear on ram usage! */ $counter++; - if($counter > 100) { + if($counter > 20) { echo "Redirecting to <a href=\"firewall_shaper_queues.php\">Firewall Shaper Queues</a>.<p>"; echo "<meta http-equiv=\"refresh\" content=\"1;url=firewall_shaper_queues.php\">"; mwexec("/usr/bin/killall -9 pfctl"); |