Great!  killall seems to work like that.  One problem.
It won't do it more than once.  I thought the -HUP signal restarted the program
with the same PID and everything.  Just reloaded the config file kind of
thing.  This works once.  The next time the program dies.  I tried this with
syslog-ng and klogd.  klogd just died whereas syslog-ng restarts once and then
dies the second time.
What is up with this system or am I just using the command wrong?  Or is this
something that all foolish newbies run into.
: )

sim

Jima wrote:

> On Mon, 9 Apr 2001, Simeon Johnston wrote:
> > I am trying to rotate my logs but am having problems with logrotate.
> >
> > This is the command used.
> >
> > /var/log/logfile {
> >      postrotate
> >          /usr/bin/killall -HUP `cat /var/run/syslog-ng.pid`
> >      endscript
> > }
>
>  Uh, 'killall' is used for process names, 'kill' is used for process IDs.
> Don't mix and match; it gets ugly.  (I make that mistake on the command
> line, where it nicely whines at me.)  You could change it to either:
>
> /usr/bin/killall -HUP syslog-ng
>
>  or
>
> /bin/kill -HUP `cat /var/run/syslog-ng.pid`
>
>  The former will probably work, regardless of the location of the pid file
> (which it's not dependent on anyway), but the latter would, of course,
> require the pid file to be in /var/run.
>  Using killall for such matters can have some annoying side effects, but I
> suspect that this won't be the case for this situation.  No guarantees,
> though.
>
> > The problem with this is that the syslog-ng.pid file seems to be
> > generated in whatever directory you started syslog-ng from instead of
> > /var/run/*.
> > Is this a configuration problem of the system?
> > If a system problem how do I go about fixing it?
> > Is there a simpler way to send an HUP signal?
>
>  Dunno.
>  Dunno.
>  Yep, 'killall'.  You're already using it, but you shouldn't be -- at
> least not in that context.
>
> > I am using Redhat-6.2 on an ALPHA with syslog-ng 1.4.11.
> >
> > I already posted this to another list but they havn't responded.  The list
> > server might be down or something because I havn't received anything from
> > them for quite some time.
> > Can anyone help me?
>
>  Are you kidding?  We have a hard enough time helping ourselves. :)
>
>  Good luck on this.
>
>      Jima
>
> _______________________________________________
> tclug-list mailing list
> tclug-list at mn-linux.org
> https://mailman.mn-linux.org/mailman/listinfo/tclug-list