Project

General

Profile

Download (3.41 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
    diag_limiter_info.php
5
    Copyright (C) 2010 Scott Ullrich
6
    Copyright (C) 2013-2015 Electric Sheep Fencing, LP
7
    All rights reserved.
8

    
9
    Redistribution and use in source and binary forms, with or without
10
    modification, are permitted provided that the following conditions are met:
11

    
12
    1. Redistributions of source code must retain the above copyright notice,
13
       this list of conditions and the following disclaimer.
14

    
15
    2. Redistributions in binary form must reproduce the above copyright
16
       notice, this list of conditions and the following disclaimer in the
17
       documentation and/or other materials provided with the distribution.
18

    
19
    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
20
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21
    AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22
    AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
23
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
    POSSIBILITY OF SUCH DAMAGE.
29
*/
30

    
31
/*
32
	pfSense_BUILDER_BINARIES:	/usr/bin/top
33
	pfSense_MODULE:	system
34
*/
35

    
36
##|+PRIV
37
##|*IDENT=page-diagnostics-limiter-info
38
##|*NAME=Diagnostics: Limiter Info
39
##|*DESCR=Allows access to the 'Diagnostics: Limiter Info' page
40
##|*MATCH=diag_limiter_info.php*
41
##|-PRIV
42

    
43
require("guiconfig.inc");
44

    
45
$pgtitle = gettext("Diagnostics: Limiter Info");
46
$shortcut_section = "trafficshaper-limiters";
47

    
48
if($_REQUEST['getactivity']) {
49
	$text = `/sbin/ipfw pipe show`;
50
	if($text == "") 
51
		$text = "We could not find any limiters on this system.";
52
	echo "Limiters:\n";
53
	echo $text;
54
	$text = `/sbin/ipfw queue show`;
55
	if($text != "") {
56
		echo "\n\nQueues:\n";
57
		echo $text;
58
	}
59
	exit;
60
}
61

    
62
include("head.inc");
63

    
64
?>
65
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
66
<?php include("fbegin.inc"); ?>
67
<script type="text/javascript">
68
//<![CDATA[
69
	function getlimiteractivity() {
70
		var url = "/diag_limiter_info.php";
71
		var pars = 'getactivity=yes';
72
		jQuery.ajax(
73
			url,
74
			{
75
				type: 'post',
76
				data: pars,
77
				complete: activitycallback
78
			});
79
	}
80
	function activitycallback(transport) {
81
		jQuery('#limiteractivitydiv').html('<font face="Courier" size="2"><pre style="text-align:left;">' + transport.responseText  + '<\/pre><\/font>');
82
		setTimeout('getlimiteractivity()', 2000);
83
	}
84
	setTimeout('getlimiteractivity()', 5000);
85
//]]>
86
</script>
87
<div id="maincontent">
88
<?php
89
	if($savemsg) {
90
		echo "<div id=\"savemsg\">";
91
		print_info_box($savemsg);
92
		echo "</div>";	
93
	}
94
	if ($input_errors)
95
		print_input_errors($input_errors);
96
?>
97
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="diag limiter info">
98
  <tr>
99
    <td>
100
	<table id="backuptable" class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0" summary="tabcont">
101
		<tr>
102
			<td align="center">
103
				<table summary="results">
104
					<tr><td>
105
						<div id="limiteractivitydiv">
106
							<?=gettext("Gathering Limiter information, please wait...");?>
107
						</div>
108
					</td></tr>
109
				</table>
110
			</td>
111
		</tr>
112
	</table>
113
    </td>
114
  </tr>
115
</table>
116
</div>
117
<?php include("fend.inc"); ?>
118
</body>
119
</html>
(19-19/252)