1 |
9972f533
|
Bill Marquette
|
#!/usr/local/bin/php
|
2 |
|
|
<?php
|
3 |
|
|
/* $Id$ */
|
4 |
|
|
/*
|
5 |
|
|
diag_logs_slbd.php
|
6 |
|
|
part of pfSense
|
7 |
|
|
|
8 |
|
|
Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
|
9 |
|
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
10 |
|
|
All rights reserved.
|
11 |
|
|
|
12 |
|
|
Redistribution and use in source and binary forms, with or without
|
13 |
|
|
modification, are permitted provided that the following conditions are met:
|
14 |
|
|
|
15 |
|
|
1. Redistributions of source code must retain the above copyright notice,
|
16 |
|
|
this list of conditions and the following disclaimer.
|
17 |
|
|
|
18 |
|
|
2. Redistributions in binary form must reproduce the above copyright
|
19 |
|
|
notice, this list of conditions and the following disclaimer in the
|
20 |
|
|
documentation and/or other materials provided with the distribution.
|
21 |
|
|
|
22 |
|
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
23 |
|
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
24 |
|
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
25 |
|
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
26 |
|
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
27 |
|
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
28 |
|
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
29 |
|
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
30 |
|
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
31 |
|
|
POSSIBILITY OF SUCH DAMAGE.
|
32 |
|
|
*/
|
33 |
|
|
|
34 |
|
|
require("guiconfig.inc");
|
35 |
|
|
|
36 |
|
|
$slbd_logfile = "{$g['varlog_path']}/slbd.log";
|
37 |
|
|
|
38 |
|
|
$nentries = $config['syslog']['nentries'];
|
39 |
|
|
if (!$nentries)
|
40 |
|
|
$nentries = 50;
|
41 |
|
|
|
42 |
|
|
if ($_POST['clear']) {
|
43 |
929d48cb
|
Scott Ullrich
|
exec("killall syslogd");
|
44 |
9972f533
|
Bill Marquette
|
exec("/usr/sbin/clog -i -s 262144 {$slbd_logfile}");
|
45 |
929d48cb
|
Scott Ullrich
|
system_syslogd_start();
|
46 |
9972f533
|
Bill Marquette
|
}
|
47 |
|
|
|
48 |
|
|
$pgtitle = "Diagnostics: System logs: Load Balancer";
|
49 |
|
|
include("head.inc");
|
50 |
|
|
|
51 |
|
|
?>
|
52 |
|
|
|
53 |
|
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
54 |
|
|
<?php include("fbegin.inc"); ?>
|
55 |
|
|
<p class="pgtitle"><?=$pgtitle?></p>
|
56 |
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
57 |
|
|
<tr><td>
|
58 |
|
|
<?php
|
59 |
|
|
$tab_array = array();
|
60 |
|
|
$tab_array[] = array("System", false, "diag_logs.php");
|
61 |
|
|
$tab_array[] = array("Firewall", false, "diag_logs_filter.php");
|
62 |
|
|
$tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
|
63 |
|
|
$tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
|
64 |
|
|
$tab_array[] = array("IPSEC VPN", false, "diag_logs_ipsec.php");
|
65 |
|
|
$tab_array[] = array("PPTP VPN", false, "diag_logs_vpn.php");
|
66 |
|
|
$tab_array[] = array("Load Balance", true, "diag_logs_slbd.php");
|
67 |
|
|
$tab_array[] = array("Settings", false, "diag_logs_settings.php");
|
68 |
|
|
display_top_tabs($tab_array);
|
69 |
|
|
?>
|
70 |
|
|
</td></tr>
|
71 |
|
|
<tr>
|
72 |
|
|
<td>
|
73 |
|
|
<div id="mainarea">
|
74 |
|
|
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
|
75 |
|
|
<tr>
|
76 |
|
|
<td colspan="2" class="listtopic">
|
77 |
|
|
Last <?=$nentries;?> Load Balancer log entries</td>
|
78 |
|
|
</tr>
|
79 |
|
|
<?php dump_clog($slbd_logfile, $nentries); ?>
|
80 |
|
|
<tr><td><br><form action="diag_logs_slbd.php" method="post">
|
81 |
|
|
<input name="clear" type="submit" class="formbtn" value="Clear log"></td></tr>
|
82 |
|
|
</table>
|
83 |
|
|
</div>
|
84 |
|
|
</form>
|
85 |
|
|
</td>
|
86 |
|
|
</tr>
|
87 |
|
|
</table>
|
88 |
|
|
<?php include("fend.inc"); ?>
|
89 |
fa90d5f7
|
Scott Ullrich
|
<meta http-equiv="refresh" content="60;url=<?php print $_SERVER['PHP_SELF']; ?>">
|
90 |
9972f533
|
Bill Marquette
|
</body>
|
91 |
|
|
</html>
|