Netmond V2. Installation

Here described how to install Netmond in your system.


System requirements

Before making Netmond you need to check following components installed.

  • ANSI C compiler gcc or egcs
  • parser generator - yacc or bison
  • lexical analyzer generator - lex or flex

Many OSes like BSD/OS, FreeBSD è Linux have it in base software set.
But in others, like Solaris, you heed additional steps to install them.


Downloading

Netmond sources are publicly available via Internet from FTP site: <ftp://ftp.nsk.su/pub/RinetSoft/>.

Netmond sources available as tar.gz archive with following naming convention:

netmond-X.Y-Z.tgz
where X.Y - current version number, Z - revision number.
netmond-X.Y.tgz
here revision number Z omitted, so this is last revision in this version

To get last sources for version 2.1 you need to look up file : <ftp://ftp.nsk.su/pub/RinetSoft/netmond-2.1.tgz>.

Save this archive in your working directory and extract it with command:

$ gunzip -c netmond-2.1.tgz | tar -xvf -

Subdirectory netmond-2.1-Z will be created where Z is current revision number.
Go to this directory to build Netmond.

Possibly, sources will available in other formats like Linux RPM. Build steps will differ for this formats.


Configuring

There are number of special files in working directory:

PACKAGE
keep name of software package netmond.
VERSION
keep full version number including revision 2.1-b9.
README è README.NOW
keep package short description, last-minute corrections and comments.
CHANGES
keep history of modifications from version to version, version comments, revision comments, description of added features, list of bugs removed etc.

First, launch configuration script to make automatic adaptation to current environment, searching libraries, headers, checking specific functions availability. Configuration script create files Makefile and config.h, needed for successful Netmond build in your system:

$ ./configure

Sometimes script falls to automatically detect options correctly. You may manually specify them as environment variables. For Bourne shell it may looks like:

$ CC=cc CFLAGS=-O LIBS=-lposix LDFLAGS=-static ./configure

By default, configure script plan to install resulting executable to /usr/local/bin directory. You can change this path with --prefix script argument. All options description will be printed with --help argument.

In addition to standard arguments configure script understand following arguments:

--enable-debug=MODE
build debug version, where MODE can be debug, trace, memory or all. ATTENTION!: this option only for developers, do not use it without strong necessity!
--with-dmalloc
build with dmalloc library (Debug Malloc) for extended memory usage tracing.
--without-pthread
do not use POSIX Threads, instead Netmond will use fork() syscall where possible.
ATTENTION!:Use this options if you do not trust 'pthreads' realization in your system.

After configuring, you may look at config.h file to check system - dependent definitions.


Compiling and installing

Check the Makefile correctness and modify it if needed. If this file does not exist, possibly you may forget to run configure-script.

Launch Netmond building:

$ make

Building process has to finish without any error messages. After build executable named netmond appear in current directory. Check it:

$ ./netmond -v

To install program you need to have root privileges.

# make install

In this step netmond executable will be copied to /usr/local/bin directory or to $prefix/bin directory if you changed defaults. Sample configuration file will be copied to /etc system directory. You need carefully edit this file before to launch netmond.

Actually, netmond work from any place you store it. Of course, netmond have to find its configuration file to run.


Launching

To use netmond properly you need to create special configuration file for it. By default netmond try to load /etc/netmon.conf.

As a rule, Netmond is launched at system startup from /etc/rc.local system startup script. Netmond must start after syslogd(8) service start, and filesystem have mounted where RootDir placed.

At startup Netmond generate intensive network traffic. This is initial check of all objects and SNMP tables reindexing.

Following strings can be added to end of /etc/rc.local script to launch Netmond:

if [ -f /etc/netmon.conf -a -f /usr/local/bin/netmond ]; then
/usr/local/bin/netmond ; echo -n "netmond "
fi

Netmond inherit privileges from user who start it. Privileges are not modified at execution time. If Netmond launched from user other then root it is impossible to open sockets under 1024 and impossible to handle ICMP messages. Such a user must have write permissions for RootDir.

Netmond run command have following format:

netmond [ -c file ] [ -C ] [ -v ] [ -w sec ]
-c file
path for alternative configuration file Netmond. Default: /etc/netmon.conf.
-C
Syntactic check of configuration file. Errors are reported to stderr or internal interpretation of config printed to stdout if no errors.
Return value is 1 if errors found, and 0 otherwise.
-v
print current version number, build options and exit.
-w sec
Set internal watchdog timeout, in seconds. Default is 10 minutes. Watchdog disabled if timeout set to 0.

New or modified config file can be checked with command:

$ netmond -c /path/file.conf -C | more

Netmond feel following signals:

SIGALRM
run watchdog once.
SIGHUP
reload configuration file.
SIGINT è SIGTERM
Normal program exit.

© 1998-2002, Rinet Software