Starting NetSaint


IMPORTANT: Before you actually start NetSaint, you'll have to make sure that you have configured it properly (see the docs on the main and host files), verified the config data, and installed some plugins on your system! Plugins are distributed separately from NetSaint, but are necessary if you actually want to monitor anything. You can grab the plugins from the downloads page at http://www.netsaint.org

Methods For Starting NetSaint

There are basically four 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.

The sample init scripts are designed to work under Linux, so if you want to use them under FreeBSD, Solaris, etc. you will have to do a little hacking...

Stopping and Restarting NetSaint

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