[mrtg] reload config of MRTG in daemon mode
Niall O'Reilly
Niall.oReilly at ucd.ie
Sat Apr 24 15:59:16 CEST 2010
On 23/04/10 12:49, Obdeijn, Arnold wrote:
> Hello all,
>
> I am running MRTG in daemon mode (RunAsDaemon) and I want MRTG to
> reload it's config file three times a day. In the documentation I
> found the following:
>
> "Note that when using daemon mode MRTG should no longer be started
> from cron as each new process runs forever. Instead MRTG should be
> started from the command prompt or by a system startup script."
>
> "Also note that in daemon mode restarting the process is required in
> order to activate changes in the config file"
>
> So what I want is a cron that restarts MRTG three times a day. Now my
> question is: what is the best (cleanest, most elegant) way to restart
> MRTG in this case? I am on a SUN server.
Do you have some script to start MRTG after system
startup, perhaps in /etc/init.d?
If this script takes a 'restart' subcommand, your cron job
can fire the script using this subcommand. Otherwise, you
could fire the script twice: once with 'stop' and later
with 'start'.
IHTH
/Niall
More information about the mrtg
mailing list