Starting NetSaint


Methods For Starting NetSaint

There are basically three different ways you can start NetSaint:

  1. Manually, as a foreground process (useful for initial testing and debugging)
  2. Manually, as a background process
  3. Manually, as a daemon
  4. Automatically at system boot

Let's examine each method briefly...

Running NetSaint Manually as a Foreground Process

If you enabled the debugging options when running the configure script (and recompiled NetSaint), this would be your first choice for testing and debugging. Running NetSaint as a foreground process at a shell prompt will allow you to more easily view what's going on in the monitoring and notification processes. To run NetSaint as a foreground process for testing, invoke NetSaint like this...

./netsaint <main_config_file>

Note that you must specify the path/filename of the main configuration file on the command line. Passing the name of the host configuration file will result in an error message and program termination.

To stop NetSaint at any time, just press CTRL-C. If you've enabled the debugging options you'll probably want to redirect the output to a file for easier review later.

Running NetSaint Manually as a Background Process

To run NetSaint as a background process, invoke it with an ampersand as follows...

./netsaint <main_config_file> &

Note that you must specify the path/filename of the main configuration file on the command line. Passing the name of the host configuration file will result in an error message and program termination.

Running NetSaint Manually as a Daemon

NetSaint 0.0.5 has some experimental code for running NetSaint as a daemon. In order to run Netsaint in daemon mode you must supply the -d switch on the command line as follows...

./netsaint -d <main_config_file>

Running NetSaint Automatically at System Boot

When you have tested NetSaint and are reasonably sure that it is not going to crash, you will probably want to have it start automatically at boot time. To do this (in Linux) you will have to create a startup script in your /etc/rc.d/init.d/ directory. You will also have to create a link to the script in the runlevel(s) that you wish to have NetSaint to start in. I'll assume that you know what I'm talking about and are able to do this.

A sample init script (named init-script) is created in the base directory of the NetSaint distribution when you run the configure script. You can install the sample script to your /etc/rc.d/init.d directory using the 'make install-init' command, as outlined in the installation instructions. If you choose to run NetSaint in daemon mode, you can use the 'make install-daemoninit' command to install an appropriate init script.

Stopping and Restarting NetSaint

Directions on how to stop and restart NetSaint can be found here.