On Fri, May 22, 2009 at 6:47 AM, Rich Shepard <[email protected]>wrote:
> Each time I think the mail log reporting issue is resolved I find that it > is not. > > Yesterday I received one of the two reports, today none. Both days the > results of the 'set' command was mailed to me showing that the process > supposedly ran and exited with the success code of '0'. That the 19th line > of /etc/cron.daily/1pflogsumm (set -x > log_error.txt 2>&1) is processed by > the shell and the results e-mailed to me suggests that the 1pflogsumm > script > has actually been run, but the mailed report has not been appended to my > INBOX (/var/spool/mail/rshepard). > > I can manually run /usr/local/bin/pflogsumm (using the options in the > shell script)and the report is written to stdout; did so just now. However, > today I cannot manually run /etc/cron.daily/1pflogsumm; yesterday I could. > > This all leads me to believe that the problem is primarily with invoking > the shell script. Why the results of the set command are delivered to my > inbox while the results of the rest of the script are not makes on sense to > me. Here are relevant entries from the procmail log: > > >From [email protected] Thu May 21 00:02:02 2009 > Subject: salmo Daily Mail Report for Thursday, 21 May 2009 > Folder: /var/spool/mail/rshepard > > >From [email protected] Thu May 21 00:02:06 2009 > Subject: cron: /etc/cron.daily/1pflogsumm > Folder: /var/spool/mail/rshepard > > >From [email protected] Fri May 22 00:02:06 2009 > Subject: cron: /etc/cron.daily/1pflogsumm > Folder: /var/spool/mail/rshepard > > The first entry is /etc/cron.daily/1pflogsumm run from root's crontab. > The > second entry is the log_error.txt mailed from that invocation of the > script. > While other scripts in /etc/cron.daily ran at 04:40 yesterday, 1pflogsumm > did not. > > The third entry is the log_error.tex from this morning's invocation of > 1pflogsumm in root's crontab, not the usual daily run of all scripts at > 04:40. > > None of this makes sense to me as it is inconsistent. What more can I do > to test to try to find what's happening? Is it a cron issue somehow? I am > stymied and frustrated that this cannot be quickly resolved. > > Rich > I haven't been following this little adventure of yours all that closely, so please forgive me if this has been suggested before. What about putting a statement in the 1pflogsumm script itself to log to a file each time it is run? You could stick something like the following near the beginning: echo $(date) >> /tmp/1pflogsumm.log Then at least you can eliminate cron as a possible suspect. Then we can start expanding what gets logged from the script. And someday you will be logging so much, that we'll have to create a script to summarize the log for you. it'll be called 2pflogsummlogsumm and we can begin the whole process over again! -wes _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
