diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-14 20:34:31 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-14 20:34:31 +0000 |
commit | 526eef171c9fcf538fba61caccb19d0947a26b5f (patch) | |
tree | 26256e783c49c280077b5c26611fbf7e6aeca2e4 /usr/local/www/diag_logs_filter.php | |
parent | 349b8d247b4ec943874b7676b0ffa1613f4ef568 (diff) | |
download | pfsense-526eef171c9fcf538fba61caccb19d0947a26b5f.zip pfsense-526eef171c9fcf538fba61caccb19d0947a26b5f.tar.gz |
Return correct number of entries
Ticket #783
Diffstat (limited to 'usr/local/www/diag_logs_filter.php')
-rwxr-xr-x | usr/local/www/diag_logs_filter.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php index 7ba25c4..30a9ffc 100755 --- a/usr/local/www/diag_logs_filter.php +++ b/usr/local/www/diag_logs_filter.php @@ -57,7 +57,7 @@ function conv_clog($logfile, $tail = 50) { $sor = isset($config['syslog']['reverse']) ? "-r" : ""; - exec("/usr/sbin/clog {$logfile} | /usr/bin/tail {$sor} -n {$tail}", $logarr); + exec("/usr/sbin/clog {$logfile} | /usr/bin/tail {$sor} -n 500", $logarr); $filterlog = array(); @@ -65,6 +65,9 @@ function conv_clog($logfile, $tail = 50) { foreach ($logarr as $logent) { + if($counter > $nentries) + break; + $log_split = ""; preg_match("/(.*)\s(.*)\spf:.*rule.*\(match\):\s(\w+)\sin\son\s(\w+:)\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,7})\s([\<|\>])\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,7}):.*/",$logent,$log_split); |