SUMMARY: Cron and /usr/sbin/log - incompatible?

From: Smith, Gavin <SmithG_at_capitagroup.co.uk>
Date: Tue, 17 Nov 1998 12:21:28 +0000

Hi,

Apologies for the late Summary.

I received no response to this question from the list, but did talk to
a DEC/COMPAQ support person who told me that, yes, cron and
the /usr/sbin/log command are incompatible.

Apparently /usr/sbin/log does not like being run as a background
process. It WILL hang if run from the command line as a background
process, it reports a 'Stopped(SIGTTIN)', foregrounding the process
results in the command completing.

However what it wont do is eat up all available CPU time, which it
appears to do when run from cron. The person I spoke to had not
seen it do this, although it does it every time on each of my systems.

We no longer use the /usr/sbin/log command in scripts that we run
from cron. Ho-Hum.
 
Gavin.

*** Original Message ***

> ----------
> From: Smith, Gavin
> Sent: Wednesday, September 30, 1998 4:42 PM
> To: '"Internet - DUnix Admin List - Q&A"'
> Subject: Cron and /usr/sbin/log - incompatible?
>
> Hi,
>
> We run an overnight script to perform our backups and various
> housekeeping tasks, part of the script uses the /usr/sbin/log
> command.
>
> When run from the command line the script functions as expected,
> but run via cron the script hangs after completing the /usr/sbin/log
> command. I can reproduce this with the following command / script :-
>
> Script :-
> #!/bin/ksh
> echo "Done"
> exit
>
> Command :-
> /usr/sbin/log /tmp/gavin/logit_log.log /tmp/gavin/logit_log.scr
>
> Crontab entry :-
> 16 18 * * * /usr/sbin/log /tmp/gavin/logit_log.log
> /tmp/gavin/logit_log.scr
>
> The log is produced with the correct output in it, but a quick 'ps'
> shows the hung processes taking up all available CPU time :-
>
> # ps -ef | grep logit
> root 4399 28581 46.3 18:16:00 ?? 1:50.27 /usr/sbin/log
> /tmp/gavin/logit_log.log /tmp/gavin/logit_log.scr
> root 14668 469 0.0 18:16:00 ?? 0:00.04 sh -c
> /usr/sbin/log /tmp/gavin/logit_log.log /tmp/gavin/logit_log.scr
> root 28581 14668 46.2 18:16:00 ?? 1:50.36 /usr/sbin/log
> /tmp/gavin/logit_log.log /tmp/gavin/logit_log.scr
> root 5174 3472 1.0 18:19:46 ttyq3 0:00.03 grep logit
>
> I've tested this on a DEC 3000/500 running V4.0D (Patch Kit #1) and
> an Alphaserver 2100 running V4.0B (Patch Kit #5).
>
> Would anyone like to point out to me where I'm being stupid, other
> than using /usr/sbin/log in the first place :o)
>
> Ta!
>
> Gavin Smith.
>
> END
>
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************
Received on Tue Nov 17 1998 - 13:51:43 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT