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