Documentation for Knetmon 0.90betaR2


1. Intro
2. Requirements
3. Installing
4. Compiling
5. Configuration
6. Command line options
7. Running multiple knetmons


INTRO

Knetmon is free software according to the GNU General Public License.

Knetmon is a program similar to for instance netmon for windows,
it displays the active users in a network (unix and windows) and
provides an interface to many networking related command line tools
(samba, nfs, ping, talk and so on).

Latest versions you can get from
http://www.rz.tu-ilmenau.de/~lekus/software.htm

Please tell me if you manage to compile knetmon on another system than linux/pc.
Bug reports, comments, patches, suggestions ... to 
alexander.neundorf@rz.tu-ilmenau.de

Alexander Neundorf


REQUIREMENTS:

For complete functionality you need:
-the KDE-libraries (http://www.kde.org), at least libkdecore.so
-the Qt-library (http://www.troll.no)
-a working samba installation, this means the following should work:
      -smbclient
      -smbstatus
      -smbmount
      -smbumount
-a working nfs-system, this means:
      -NFS-support in the kernel ("mount ... -t nfs" must work)
      -"showmount -e" must work
   -nslookup
   -ping
   -"domainname -d" should work
   -talk or another talk program
   -telnet
   -rlogin
   -finger

Either a working samba must be installed, then nfs isn't required,
or nfs must work, then samba doesn't matter.

If you have only nfs, then showmount, nslookup, domainname -d and ping are
absolutely required.

You can decide what will be used via the configuration dialog of knetmon.
It will also work without talk, telnet, rlogin and finger.

It is compiled with:
   libqt 1.40
   (earlier versions, at least 1.33 should work too)
   libc 5.4.33
   libg++ 27.2.8
   libstdc++ 27.1.4
   g++ 2.7.2.3


INSTALLING:

Unpack knetmon.0.90beta.tgz (tar -zxvf knetm...), enter the new directory
and enter 'make install'.
This should copy the binary into your KDE binary directory, create a KDE applink
and create a documentation directory.
Maybe you have to restart KPanel or KWM if you are using it.
Then you should find Knetmon in the start menu under "Internet".
If you want to install Knetmon manually:
-copy the binary knetmon/bin/knetmon in your KDE binary directory ($KDEDIR/bin)
-copy knetmon/knetmon.kdelnk in the location where your other *.kdelnk files are
 and restart kpanel
-create a directory $KDEDIR/share/doc/html/eng/knetmon and copy the file index.html in this directory

If you get a lot of output on the console,
start it like: knetmon >/dev/null &
This should help.

If Knetmon runs, configure it, you will find the configuration dialog
under ->More ->Configure .

Make sure that you have the right to execute smbmount,
this means, that smbmount and smbumount must be installed suid
(the root of your system must set the "set user id on execution"-flag
in both files).


COMPILING:

Change to the directory knetmon and enter make,
then it should compile, the binary will be created in the directory knetmon and bin.
If it doesn't compile, edit the file config.h to fit your configuration,
this means mainly to adjust the directories of your Qt and/or KDE headers and/or libraries.
Some warnings will appear.

Users of RedHat 5.1 and other systems without libg++ need additional
knetmon.missing_files.tgz, this must be installed over the source of knetmon.
You can get it from the same locations where you can get knetmon.

CONFIGURATION:

If Knetmon runs, configure it, you will find the configuration dialog
under ->More ->Configure .
Knetmon reads its configuration usually from the file ($KDEDIR)/share/config/knetmonrc
and if this one doesn't exist from ($HOME)/.kde/share/config/knetmonrc.


Under Settings:


Mount shares under:

Enter here the directory where you want to mount the shares and exports of other host.
To access the shares of other hosts, they must be mounted first.
E.g. if you enter "/tmp/network", and a wiht the name "anyhost" has a public share "anyname",
this share will be mounted under /tmp/network/ANYHOST/anyname.
It is very important that you have write permission in this directory.
It MUST be an absolute (starting with "/") path.
I think, in the directory /tmp everybody has write permissions, so it should 
work this way.

possible values: any directory, where you have permission to write
default value: /tmp/network/
knetmonrc: mount_point



Temporary file:

In this file knetmon redirects the the output of the programs it uses.
Usually you can keep it this way.
If you run more knetmons at once with different servers with different
configuration files, in every configuration file you should set another
tmpfile.

possible values: any file, you have permission to write
default value: /tmp/knetmon.tmp
knetmonrc: tmpfile


Update period:

Here you enter the number of seconds, after which Knetmon updates its
list of hosts.
If you enter "manual", Knetmon will only update after selecting "Refresh"
from the menu under "More".

possible values: 5 to 3600, or "manual"
default value: 180
knetmonrc: refresh


Unmount on exit

This decides, wether all the shares which were mounted by knetmon and 
all the created directories will be unmounted or removed if you exit 
or kill knetmon.
You should check this option, else you may have problems on multi user systems.

possible values: yes, no
default value: yes
knetmonrc: unmount_on_exit


Under Network-Settings:


Your user name:

This is the name knetmon suggests to use for actions, where usernames
are required, but you have always the chance to enter another one.

possible values: any_name
default value: rookie
knetmonrc: std_user


Use NSLookup:

Here you decide, wether Knetmon will use nslookup for some actions.
If you check this option, then you must enter the IP address of your
nameserver in the edit line, if your LAN is working well you should 
also be able to enter the name of your nameserver.
If you select this option, you are able to retrieve the IP addresses of other
hosts from your nameserver, you can force knetmon to use the IP addresses for
samba (it equals "smbclient -I 123.456.789.012 ..."), and you can get the
list of running hosts in another way than using smbclient.
If you are not sure, don't check this option.

possible values: don't select (no) or the IP address or name of your nameserver
default value: no
knetmonrc: use_nslookup


Use samba for getting browselist

This is a very important option, if selected,  knetmon will try to get the
userlist using smbclient from the host you select via "Get browselist from:".
If no, it will try to receive the complete namelist from the nameserver and
then ping all hosts in this list.
Using smbclient is faster , but the list you will get can
be a bit wrong, because it takes some time til hosts which left the network
are removed from this list on the server.

If you decide no and knetmon will use the list from the name server,
you will always have a correct display, but it takes some time to ping all,
depending on the network. In the LAN where I am with 60 hosts, it takes about
10 to 15 seconds and the cpu-usage goes up to 100% (AMD K6 200).
If you don't check this option you must check "Use NSLookup" and enter there
the correct IP address or name of your nameserver.
In this case ensure, that ping works.
If you are in a unix-network without windows or samba, you must set 
this option to no.
If you are not sure, check this option.

possible values: yes, no
default value: yes
knetmonrc: use_smbclient_for_getting_userlist


Get browselist from:

From the host you enter here Knetmon will try to get a browsing list using "smbclient -L ...".
Maybe you can keep it "localhost", but it should work better with the nameserver
or something like that of your network, just try it.
If you didn't select "Use samba for getting browselist" this option should be without effect.

possible values: name of a samba or windows machine
default value: localhost
knetmonrc: browselist_server


Use IP for samba

If yes, then knetmon will call smbclient like: smbclient -L hostname -I 192.11.200.10 
else, if no, then it will work like: smbclient -L hostname
so decide, if you need it.
If you select it, then you must select "Use NSLookup" too.
If you are not sure, don't select this option.

possible values: yes, no
default value: no
knetmonrc: use_ip_for_samba


Under GUI-Settings:


Use special talk program:

If you want to use the standard unix-talk in a xterm, then
don't check this, else if you want to use a Xwindows talk program
(which doesn't run in a xterm) enter the name in the edit line.
It is important that this talk is started with 
"yourXtalk username@hostname" to talk to user "username" on host "hostname".
Since this is Knetmon, you may want to enter "ktalk".

possible values: any working X talk program
default value: not selected (standard)
knetmonrc: xtalk


Max number of button rows:

Maximal number of buttons vertically, only effects the display.

possible value: any number above 0
default value: 40
knetmonrc: max_rows


Adjust fontsize:

Here you may change the font size of the buttons, this only effects the display.
Try what you like.

possible values: any font size
default value: 10
knetmonrc: font_size


Use following xterm:

This xterm will be used to execute ping, rlogin and so on in.
Kvt doesn't work, I think, you should keep it "xterm".

possible values: any xterms with options equal to the standard xterm
default value: xterm
knetmonrc: xterm


Start xterm with options: 

Every xterm selected above will be started with this options, set them as you like,
for instance "-fn 7x14" to have the 7x14 font in a standard xterm.

possible values: valid options for the selected xterm
default: 
knetmonrc: xterm_options


Explore with:

This is the filemanager which will be started if you choose "explore host".
If you want to start your filemanager "xyz-fm" showing the directory "dontknow"
for instance with "xyz-fm -d dontknow", then you would have to set
"xyz-fm -d %dir", then it should work.
If it is a console-filemanager, for instance "mc" in color with the 7x14 font, then you would have to enter:
"color_xterm -fn 7x14 -e mc -c %dir".

possible values: any working filemanager
default value: kfmclient openURL %dir
knetmonrc: filemanager

COMMAND LINE OPTIONS

There are only a few command line options for knetmon at the moment:
-c /anydir/ownconfigfile
	starts knetmon reading and writing its configuration to the file "/anydir/ownconfigfile"
-h	prints a short helptext
-v	prints the version number

RUNNING MULTIPLE KNETMON'S

If you want to see the users of more than one workgroup or from different
servers, you can start knetmon with different configfiles.
Let's say, you want to see the workgroups "wg1" with server "wg1server"
and "wg2" with server "wg2server" then you have to do the following:<p>
Start one knetmon and configure it this way, that it works with
workgroup "wg1", maybe like this:

  Mount shares under:   /tmp/network/wg1
  Get browselist from:  wg1server
  Temporary file:       /tmp/knetmon.wg1.tmp

Then create another configuration file in your home directory or anywhere else,
the standard configuration file knetmonrc is usually located in
$KDEDIR/share/config or $HOME/.kde/share/config.
Change in this directory and copy knetmonrc like this:

   cp knetmonrc ~/.knetmonrc.wg2
Then start knetmon like:
   knetmon -c ~/.knetmonrc.wg2 >/dev/null &

Now open the configure dialog and change the following:

   Mount shares under:   /tmp/network/wg2
   Get browselist from:  wg2server
   Temporary file:       /tmp/knetmon.wg2.tmp

I hope it should work now. If you start knetmon without any further options
you should see workgroup "wg1", and to see workgroup "wg2" you have to start:
   knetmon -c ~/.knetmonrc.wg2
