Projet

Général

Profil

Télécharger (3,35 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / diag_limiter_info.php @ 9610936a

1
<?php
2
/* $Id$ */
3
/*
4
    diag_limiter_info.php
5
    Copyright (C) 2010 Scott Ullrich
6
    All rights reserved.
7

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

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

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

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

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

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

    
42
require("guiconfig.inc");
43

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

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

    
61
include("head.inc");
62

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