[TriLUG] Re: tailing forever

M. Mueller at Signalnetware.com mmueller at signalnetware.com
Fri Mar 29 08:18:36 EST 2002


On Thursday 28 March 2002 11:44 pm, you wrote:
> [M. Mueller at Signalnetware.com]
>
> > In my RH system, in /etc/cron.daily/logrotate I have the following lines:
> >
> > # rotate the files
> > logrotate /etc/logrotate.conf
> > # stop/start syslogd and klogd; this also kills the current PID of
> > syslogd # which makes the next command work
> > /etc/rc.d/init.d/syslog restart
> > # tail, follow, until pid of syslogd dies
> > tail -f --pid=$(cat /var/run/syslogd.pid) /var/log/messages
> >
> > If anybody sees something screwy here, please call it out.
>
> I don't quite see how the tail in a cron job does anything except make a
> cron job that'll 1) make a *very* long email and 2) run for a long time
> (basically a week when the next one runs - if cron even handles that)
>
> my initial suggestion pointing out --pid was to do it in a while true;
> bash loop from some terminal window or screen window or virtual console or
> wherever it is you wanted the output - doing the tail inside a cron job,
> at least at the moment, doesn't seem to really serve a purpose AFAICT.

yep, I see your point; cron outputs to email and not a screen window or 
virtual console; 

Thanks.

-- 
Michael Mueller
Signalnetware, Inc.
www.signalnetware.com
919.621.6090
Converged network solutions using open source tools



More information about the TriLUG mailing list