IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New How?
I just looked at the man page and didn't see an option to dump output to stdout. Or do you let it keep dropping numbered files, rather than have it write to a logfile?
--

Drew
New cmd >>out.txt file appends output to out.txt
or cmd >outputfile 2>&1
to catch any errors as well
thanx,
bill
New Re: How?
-O file

--output-document=file
The documents will not be written to the appropriate files,
but all will be concatenated together and written to file.
If - is used as file, documents will be printed to standard
output, disabling link conversion. (Use ./- to print to a
file literally named -.)
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
New Ahh, output-document ... so intuitive
I'll give it a try, but it may not help. I've tried it now with links and lynx, and it does the same thing. Just added logging the pid and creating a lockfile. It's the same process, but for some reason when run via cron it executes the script twice. When I call it manually it just executes once.

Is there a system-level log of what cron executes? What I mean is, aside from the logging that I do myself within the script, is there a log that shows "cron executed script foo at time"?
--

Drew
New typically /var/log/messages and any output is sent to root..
or the user the cron is executed as.
New Nothing in /var/log/messages
But /var/log/auth.log shows cron starting and stopping. For some reason cron runs twice each minute for root.

auth.log:Dec 12 09:14:01 ps17185 CRON[22094]: (pam_unix) session opened for user root by (uid=0)

auth.log:Dec 12 09:14:01 ps17185 CRON[22094]: (pam_unix) session closed for user root
auth.log:Dec 12 09:15:01 ps17185 CRON[22788]: (pam_unix) session opened for user root by (uid=0)
auth.log:Dec 12 09:15:01 ps17185 CRON[22787]: (pam_unix) session opened for user root by (uid=0)
auth.log:Dec 12 09:15:01 ps17185 CRON[22787]: (pam_unix) session closed for user root
auth.log:Dec 12 09:15:01 ps17185 CRON[22792]: (pam_unix) session opened for user drook by (uid=0)
auth.log:Dec 12 09:15:01 ps17185 CRON[22788]: (pam_unix) session closed for user root
auth.log:Dec 12 09:15:04 ps17185 CRON[22792]: (pam_unix) session closed for user drook
auth.log:Dec 12 09:16:01 ps17185 CRON[23731]: (pam_unix) session opened for user root by (uid=0)
auth.log:Dec 12 09:16:01 ps17185 CRON[23731]: (pam_unix) session closed for user root

That shows a single instance of it for my user at 15 after the hour, which is correct. But I still don't trust it. Need to create a copy of the script with heavy debugging in it but not actually send the email and cron that.
--

Drew
New Re: Nothing in /var/log/messages
is a mail server on the machine?

If not check the root user /var/mail/<user>

Any output not redirected by the script is sent to the local user, unless aliases redirect it.
New Nope, not there either
Adding debugging calls now. How tedious ...
--

Drew
New Check /etc/syslog.conf
You can adjust cron logging there. Adding

cron.debug /var/log/cron

will send cron's own debug output to /var/log/cron. Don't forget to recycle the syslog daemon after changing the configuration.
New Good point.
Egads...

debug level wooo

Drew make sure you have your log rotation proper.
New That would do it
Only entries in there for cron right now are
#cron.*       /var/log/cron.log

and
*.=info;*.=notice;*.=warn;\

auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages

So I'm not getting much info.

Assuming this can throw a huge amount of crap to disk in a hurry, what do I need to do to make sure I don't eat the disk before I can catch it?
--

Drew
New set it for a single pass first, then debug
once you find the issue, then adjust the schedule.
     Odd cron/links behavior - (drook) - (16)
         I usually use wget for stuff like that. -NT - (malraux) - (12)
             How? - (drook) - (11)
                 cmd >>out.txt file appends output to out.txt - (boxley)
                 Re: How? - (malraux) - (9)
                     Ahh, output-document ... so intuitive - (drook) - (8)
                         typically /var/log/messages and any output is sent to root.. - (folkert) - (7)
                             Nothing in /var/log/messages - (drook) - (6)
                                 Re: Nothing in /var/log/messages - (folkert) - (5)
                                     Nope, not there either - (drook) - (4)
                                         Check /etc/syslog.conf - (scoenye) - (3)
                                             Good point. - (folkert)
                                             That would do it - (drook) - (1)
                                                 set it for a single pass first, then debug - (boxley)
         Figured out the problem ... but not the solution (yet) - (drook) - (2)
             *NOW* I've figured out the problem ... I am a dumbass - (drook) - (1)
                 ICLRPD - (jake123)

Two words: meat helmet.
115 ms