diff --git a/bin/loganalyzer.php b/bin/loganalyzer.php deleted file mode 100755 index 81e3d69..0000000 --- a/bin/loganalyzer.php +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env php - '--debug']; - if (array_key_exists($a, $shortOptMap)) { - $a = $shortOptMap[$a]; - } - switch ($a) { - case '--help': - printHelp(); - exit(0); - case '--debug': - $debug = true; - break; - case '--dry-run': - $dryrun = true; - break; - default: - echo 'Unknown option: '.$a."\n"; - echo 'Please run `'.$progName.' --help` for usage information.'."\n"; - exit(1); - } -} - -$aggregator = new \SimpleSAML\Module\statistics\Aggregator(true); -$aggregator->dumpConfig(); -$aggregator->debugInfo(); -$results = $aggregator->aggregate($debug); -$aggregator->debugInfo(); - -if (!$dryrun) { - $aggregator->store($results); -} - -foreach ($results as $slot => $val) { - foreach ($val as $sp => $no) { - echo $sp." ".count($no)." - "; - } - echo "\n"; -} - - -/** - * This function prints the help output. - * @return void - */ -function printHelp() -{ - global $progName; - - echo << '--debug']; - if (array_key_exists($a, $shortOptMap)) { - $a = $shortOptMap[$a]; - } - - switch ($a) { - case '--help': - printHelp(); - exit(0); - case '--debug': - $debug = true; - break; - case '--dry-run': - $dryrun = true; - break; - case '--infile': - $infile = $v; - break; - case '--outfile': - $output = $v; - break; - default: - echo 'Unknown option: '.$a."\n"; - echo 'Please run `'.$progName.' --help` for usage information.'."\n"; - exit(1); - } -} - -$cleaner = new \SimpleSAML\Module\statistics\LogCleaner($infile); -$cleaner->dumpConfig(); -$todelete = $cleaner->clean($debug); - -echo "Cleaning these trackIDs: ".join(', ', $todelete)."\n"; - -if (!$dryrun) { - $cleaner->store($todelete, $output); -} - -/** - * This function prints the help output. - * @return void - */ -function printHelp() -{ - global $progName; - - echo <<