# Samba Status Information

&Alexander.Neundorf;
John
Knight

    anarchist_tomato@herzeleid.net

KDE British Conversion
2002-02-12
3.00.00
KDE
KControl
Samba
system information

## Samba Status Information

The Samba and NFS Status Monitor is a front end to the programs `smbstatus` and `showmount`. Smbstatus reports on current Samba connections, and is part of the suite of Samba tools, which implements the SMB (Session Message Block) protocol, also called the NetBIOS or LanManager protocol.

This protocol can be used to provide printer sharing or drive sharing services on a network including machines running the various flavours of &Microsoft; &Windows;.

`showmount` is part of the NFS software package. NFS stands for Network File System and is the traditional &UNIX; way to share folders over the network. In this case the output of `showmount` `-a localhost` is parsed. On some systems showmount is in `/usr/sbin`, check if you have showmount in your `PATH`.

### Exports

On this page you can see a big list which shows the currently active connections to Samba shares and NFS exports of your machine. The first column shows you whether the resource is a Samba (SMB) share or a NFS export. The second column contains the name of the share, the third the name of the remote host, which accesses this share. The remaining columns have only a meaning for Samba-shares.

The fourth column contains the User ID of the user, who accesses this share. Note that this does not have to be equal to the &UNIX; user ID of this user. The same applies for the next column, which displays the group ID of the user.

Each connection to one of your shares is handled by a single process (`smbd`), the next column shows the process ID (pid) of this `smbd`. If you kill this process the connected user will be disconnected. If the remote user works from &Windows;, as soon as this process is killed a new one will be created, so he will almost not notice it.

The last column shows how many files this user has currently open. Here you see only, how many files he has open just now, you don't see how many he copied or formerly opened &etc;

### Imports

Here you see which Samba- and NFS-shares from other hosts are mounted on your local system. The first column shows wether it is a Samba- or NFS-share, the second column displays the name of the share, and the third shows where it is mounted.

The mounted NFS-shares you should see on &Linux; (this has been tested), and it should also work on &Solaris; (this has not been tested).

### Log

This page presents the contents of your local samba log file in a nice way. If you open this page, the list will be empty. You have to press the Update button, then the samba log file will be read and the results displayed. Check whether the samba log file on your system is really at the location as specified in the input line. If it is somewhere else or if it has another name, correct it. After changing the file name you have to press Update again.

Samba logs its actions according to the log level (see `smb.conf`). If loglevel = 1, samba logs only when somebody connects to your machine and when this connection is closed again. If log level = 2, it logs also if somebody opens a file and if he closes the file again. If the log level is higher than 2, yet more stuff is logged.

If you are interested in who accesses your machine, and which files are accessed, you should set the log level to 2 and regularly create a new samba log file (&eg; set up a `cron` task which once a week moves your current samba log file into another folder or something like that). Otherwise your samba log file may become very big.

With the four checkboxes below the big list you can decide, which events are displayed in the list. You have to press Update to see the results. If the log level of your samba is too low, you won't see everything.

By clicking on the header of one column you can sort the list by this column.

### Statistics

On this page you can filter the contents of the third page for certain contents.

Let's say the Event field (not the one in the list) is set to `Connection`, Service/File is set to `*`, Host/User is set to `*`, Show expanded service info is disabled and Show expanded host info is disabled.

If you press Update now, you will see how often a connection was opened to share `*` (&ie; to any share) from host `*` (&ie; from any host). Now enable Show expanded host info and press Update again. Now you will see for every host which matches the wildcard `*`, how many connections were opened by him.

Now press clear.

Now set the Event field to File Access and enable Show expanded service info and press Update again.

Now you will see how often every single file was accessed. If you enable Show expanded host info too, you will see how often every single user opened each file.

In the input lines Service/File and Host/User you can use the wildcards `*` and `?` in the same way you use them at the command line. Regular expressions are not recognised.

By clicking on the header of a column you can sort the list by this column. This way you can check out which file was opened most often, or which user opened the most files or whatever.

### Section Author

Module copyright 2000: Michael Glauche and &Alexander.Neundorf; &Alexander.Neundorf.mail;

Originally written by: Michael Glauche

Currently maintained by: &Alexander.Neundorf; &Alexander.Neundorf.mail;

#### Contributors

- Conversion to kcontrol applet:

  &Matthias.Hoelzer-Kluepfel; &Matthias.Hoelzer-Kluepfel.mail;

- Use of `KProcess` instead of popen, and more error checking:

  &David.Faure; &David.Faure.mail;

- Conversion to kcmodule, added tab pages 2,3,4, bug fixed:

  &Alexander.Neundorf; &Alexander.Neundorf.mail;

Documentation copyright 2000 &Alexander.Neundorf; &Alexander.Neundorf.mail;

Documentation translated to docbook by &Mike.McBride; &Mike.McBride.mail;

Conversion to British English: John Knight anarchist_tomato@herzeleid.net