Documentation for Knetmon 0.95beta


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 netmon for windows, it displays the active
users ("network neighbourhood") 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 1.4 or newer (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
   libc 5.4.33
   libg++ 27.2.8
   libstdc++ 27.1.4
   g++ 2.7.2.1


INSTALLING:

Unpack knetmon-0.95beta.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 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 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 execute configure.
After this execute make, then it should compile.
Make sure that the shell variables QTDIR is set to the directory
where your Qt-stuff is installed (/usr/lib/qt, /usr/local/qt or something like that)
and that the shell variable KDEDIR is set to your KDE root directory (e.g. /opt/kde).

If it fails you can edit the file config.h.in, changes
in config.h will be lost after every configure run.

If you uncomment #define DEBUG_ON in defines.h, you will
get a lot of ugly debugging output from knetmon.


If you are not able to compile it, please mail me:
alexander.neundorf@rz.tu-ilmenau.de


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 "~/network", and a with the name "anyhost" has a public share "anyname",
this share will be mounted under ~/network/ANYHOST/anyname, where ~ stands for your home
directory.
It is very important that you have write permission in this directory, so
I think you should keep it as is. Another possibility would be /tmp/network,
there also everybody has write-permission.

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


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: pingu
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


Use password allways for samba

If you say yes, then everytime you take a look at the shares
of a host, you will be asked for your logon name and password.
This will call smbclient like: "smbclient //hostname/IPC$ yourpassword -L hostname -U mylogonname"
Only set it to yes, if you know what you are doing.
   
possible values: yes, no
default value: no
knetmonrc: use_pw_allways


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
-r      resets (i.e. deletes) the configuration file
-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:
Start one knetmon and configure it this way, that it works with
workgroup "wg1", maybe like this:

Mount shares under:     ~/network/wg1
Get browselist from:    wg1server

Then start another knetmon with the option -c to load another configuration
file:         knetmon -c ~/.knetmonwg2rc
Now configure this knetmon like this:

Mount shares under:     ~/network/wg2
Get browselist from:    wg2server

I hope it should work now. So you always would have to start the first knetmon
without any options, and the second always with -c ~/.knetmonwg2rc
