arpwatch
/var/log/arpwatch.log
*/
require("guiconfig.inc");
require("xmlparse_pkg.inc");
$nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
if ($_POST['clear']) {
exec("/usr/sbin/clog -i -s 262144 {$system_logfile}");
}
$i = 0;
$pkgwithlogging = false;
$apkg = $_POST['pkg'];
if(!isset($_POST['pkg'])) { // If we aren't looking for a specific package, locate the first package that handles logging.
if($config['installedpackages']['package'] <> "") {
foreach($config['installedpackages']['package'] as $package) {
$pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "packagegui");
if(is_array($pkg_config['logging'])) {
$pkgwithlogging = true;
$apkg = $package['name'];
$apkgid = $i;
break;
}
$i++;
}
}
} else {
$pkgwithlogging = true;
$apkgid = get_pkg_id($apkg);
$i = $apkgid;
}
?>
=gentitle("Diagnostics: Package logs");?>
Diagnostics: Package logs
"") {
foreach($config['installedpackages']['package'] as $package) {
$pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "packagegui");
if(is_array($pkg_config['logging'])) {
$pkgname = $package['name'];
$logtab = $pkg_config['logging']['logtab'];
if(!isset($pkg_config['logging']['logtab'])) $logtab = $pkgname;
if($apkg == $pkgname) { ?>
= $pkg_config['name']; ?>
= $logtab; ?>
Last =$nentries;?> =$apkg;?> log entries |
|