[Oisf-users] Cannot create a PID file by default

Jason Ish lists at unx.ca
Wed Apr 29 15:53:18 UTC 2015


On Wed, Apr 29, 2015 at 12:23 AM, James Moe <jimoe at sohnen-moe.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>   linux 3.16.7-21-desktop x86_64
>   suricata 2.0.7
>
>   In <suricata.yaml> is the line
> # Default pid file.
> # Will use this file if no --pidfile in command options.
> pid-file: /usr/local/var/run/suricata.pid
>
>   No pid file is created.
>   If I add the "--pidfile /usr/local/var/run/suricata.pid" option to
> the command line, the PID file is created.

If the pidfile is only specified in the configuration file, then it
will only be created if going into daemon mode.  When specific on the
command line it is created even when running in the foreground.  This
might be a bit inconsistent, but the command line flag was added at a
later date to force creation of a pidfile when not running as a
daemon, without changing existing behaviour.

>
>   Also: "kill -HUP", as shown in the section on logrotate, does not work
> .
> /bin/kill -HUP $(cat /usr/local/var/run/suricata.pid)
> does nothing.

It will re-open the log files.  What you usually want to do is move
your existing log files out of the way (rename, delete), then send the
HUP to recreate them.

Jason



More information about the Oisf-users mailing list