Loading ...
Sorry, an error occurred while loading the content.

Re: Logrotate question with syslog-ng

Expand Messages
  • Jonathon Smith
    I have been going thru the wiki and trying to setup logrotate with syslog-ng. I tried the command /bin/killall -HUP syslog-ng but it does not restart the
    Message 1 of 15 , Jan 4, 2008
    • 0 Attachment
      I have been going thru the wiki and trying to setup logrotate with syslog-ng.

      I tried the command /bin/killall -HUP syslog-ng but it does not restart the syslog-ng
      service on my nslu2.

      Before:

      447 root 2348 S /opt/sbin/syslog-ng
      458 root 3240 S /opt/sbin/sshd
      484 root 6204 S sshd: root@ttyp0
      486 ttyp0 root 2164 S -bash
      1422 root 6492 S sshd: root@notty
      1818 root 2348 S /opt/sbin/syslog-ng -f /opt/etc/syslog-ng/s

      -bash-3.2# bin/killall -HUP syslog-ng

      After:

      447 root 2348 S /opt/sbin/syslog-ng
      458 root 3240 S /opt/sbin/sshd
      484 root 6204 S sshd: root@ttyp0
      486 ttyp0 root 2164 S -bash
      1422 root 6492 S sshd: root@notty
      1852 ttyp0 root 1984 R ps -e

      Thanks.


      --- In nslu2-linux@yahoogroups.com, "Fernando Carolo" <carolo@...> wrote:
      >
      > --- In nslu2-linux@yahoogroups.com, "indypup06" <humpda@> wrote:
      > >
      > > Hi
      > > Ok...found that the -HUT command should restart the service.
      >
      > Actually, sending signal HUP to syslog-ng will force it to re-read the
      > configuration file and re-open its log files. So, if you try this
      > manually it should work, using /opt/var/log/messages (I've just tested
      > in my slug):
      >
      > # cd /opt/var/log
      > # mv messages messages.1
      > # killall -HUP syslog-ng
      > # cat messages
      > Jan 17 14:19:31 SLUG syslog-ng[1610]: new configuration initialized
      >
      > As you can see, syslog-ng re-creates the missing 'messages' file.
      >
      > One thing that comes to my attention in your script is how you are
      > calling killall:
      >
      > > /opt/var/log/router {
      > > rotate 5
      > > postrotate
      > > /bin/sbin/ killall -HUP syslog-ng
      > > endscript
      > > }
      >
      > I believe you should call '/bin/killall', since this is the exact
      > location of the utility. Can you double check this?
      >
      > Regards,
      >
      > --
      > Fernando Carolo
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.