>
> > 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:
>
> Wes,
>
>   Joe suggested this a few weeks ago and there is such a statement:
>
> set -x  > log_error.txt 2>&1
>
>    It runs, the log_error.txt file is mailed to me (so commands further in
> the script are processed), and it reports the script exited successfully.
>

And you even stated as much in the first paragraph of your earlier email.
Sorry. But this does just about eliminate the cron daemon itself from the
list of suspects - its responsibility is only as far as invoking the script.

> Then at least you can eliminate cron as a possible suspect.
>
>    All other scripts in /etc/cron.daily (such as logrotate, logwatch, and
> slocate) run each day as expected.
>

Right, but if the question is "why is cron running every script but this
one?" Now we can say for certain that the answer is "cron IS running this
script, but this script itself is failing."

  I think -- and may well be wrong in my thinking -- that the key questions
> are:
>
>   1) Why does cron sometimes run the script from root's crontab at 00:02
> but
> not from within /etc/cron.daily at 04:40; sometimes the latter but not the
> former; sometimes both; sometimes none.
>

Again, you are focusing on cron here. If the set -x output appears during
each invocation, then cron is indeed running the script, and you need to
look within the script itself for the problem. As in, more logging.

  2) Why, when the script is run, the log_error report is mailed to me but
> the actual mail log summary report is not.
>

This is a good question. I don't have an answer, but generally, logging
helps. Also, in cases like this, I have found that the shell environment in
which it is running can make a big difference. This can be different when
running from cron, like envronment variables could be different, permissions
could be different (as it's running as a different user), or any number of
other things. set -x can show you some of this stuff, which we'd have to see
differential reports between when it works and doesn't in order to tell
(which you've probably sent before, but I didn't look, and can't be bothered
to search my archives right now).

  From what I see in the mail log and procmail log, if the error log and/or
> log summary reports are run they are mailed to me and properly placed in my
> inbox.
>

Is the error log ever not mailed to you when it should be?

Thanks,
>
> Rich
>

-wes
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to