[PLUG] Logs and Reporting ... Again
Roderick A. Anderson
raanders at cyber-office.net
Tue Mar 24 17:48:57 UTC 2009
Rich Shepard wrote:
> On Tue, 24 Mar 2009, Roderick A. Anderson wrote:
>
>> Try to run it (1pflogsumm) from the command line. I'm assuming this is
>> some kind of wrapper (shell, bash, etc.) around pflogsumm.pl so you should
>> also check that ownership/permissions didn't get changed somehow/someway
>> on either or both of them.
>
> Rod,
>
> For a reason I cannot immediately determine, it no longer runs from the
> command line. /etc/cron.daily/1pflogsumm is a shell script that references
> /usr/local/bin/pflogsumm (a perl script without the .pl extension on the
> file or referencing shell script).
OK.
1. Does 1pflogsumm do the same as your command line below? (copy and
paste from the file to be sure).
2. Is the execute bit set for 1pflogsumm?
>
> I updated the Date::Calc module to eliminate that as a reason for the
> sudden failure of the script to run.
>
> Running '/usr/local/bin/pflogsumm -d yesterday -e /var/log/maillog.2'
> works.
maillog.2 will have mostly stuff from the 22nd. Logrotate happened at
4:40AM the 23rd so there will probably be only a few entries for the 23rd.
Also do you have enough memory to run with the -e switch? The man page
says that switch can eat RAM like crazy.
I run this command daily at just after midnight on 200+ MByte log files
but you can see it isn't generating a lot of output.
/usr/sbin/pflogsumm -d yesterday -h 10 -u 10 --no_bounce_detail
--no_deferral_detail --no_reject_detail --no_smtpd_warnings
/var/log/maillog
\\||/
Rod
--
>
> I wonder if the reason is that the log rotation resulted in the numbers
> being incorrect so the script's looking for a non-existent log file:
>
> [rshepard at salmo ~]$ ll /var/log/maillog*
> -rw-r--r-- 1 root root 216601 Mar 24 10:03 /var/log/maillog
> -rw-r--r-- 1 root root 1219888 Mar 24 04:40 /var/log/maillog.1
> -rw-r--r-- 1 root root 1029689 Mar 23 04:40 /var/log/maillog.2
> -rw-r--r-- 1 root root 2700694 Mar 22 04:40 /var/log/maillog.3
> -rw-r--r-- 1 root root 1168552 Mar 21 04:40 /var/log/maillog.4
>
> Notice that both maillog and maillog.1 have today's date.
>
> Rich
>
More information about the PLUG
mailing list