summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_shaper_queues.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-06 03:51:46 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-06 03:51:46 +0000
commit75333cf97568bd87ccbbb0d276ff3085bb22cd6a (patch)
tree3ac2692b67806dc9d383ad100b8ea05f208ba7de /usr/local/www/firewall_shaper_queues.php
parent5de92d20adbde90d76327381652747012c1db62c (diff)
downloadpfsense-75333cf97568bd87ccbbb0d276ff3085bb22cd6a.zip
pfsense-75333cf97568bd87ccbbb0d276ff3085bb22cd6a.tar.gz
Recover from hung pfctl
Diffstat (limited to 'usr/local/www/firewall_shaper_queues.php')
-rwxr-xr-xusr/local/www/firewall_shaper_queues.php11
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");
OpenPOWER on IntegriCloud