As mentioned earlier, Samba appears in Unix as a set of daemon programs. You can view them with the Unix
ps
and
netstat
commands, you can read any messages they generate through custom debug files or the Unix
syslog
(depending on how Samba is set up), and you can configure it from a single Samba properties file:
smb.conf. In addition, if you want to get an idea of what each of the daemons are doing, Samba has a program called
smbstatus that will lay it all on the line. Here is how it works:
#
smbstatus
Samba version 2.0.4
Service uid gid pid machine
----------------------------------------------
network davecb davecb 7470 phoenix (192.168.220.101) Sun May 16
network davecb davecb 7589 chimaera (192.168.220.102) Sun May 16
Locked files:
Pid DenyMode R/W Oplock Name
--------------------------------------------------
7589 DENY_NONE RDONLY EXCLUSIVE+BATCH /home/samba/quicken/inet/common/system/help.bmp Sun May 16 21:23:40 1999
7470 DENY_WRITE RDONLY NONE /home/samba/word/office/findfast.exe
Sun May 16 20:51:08 1999
7589 DENY_WRITE RDONLY EXCLUSIVE+BATCH /home/samba/quicken/lfbmp70n.dll Sun May 16 21:23:39 1999
7589 DENY_WRITE RDWR EXCLUSIVE+BATCH /home/samba/quicken/inet/qdata/runtime.dat Sun May 16 21:23:41 1999
7470 DENY_WRITE RDONLY EXCLUSIVE+BATCH /home/samba/word/office/osa.exe
Sun May 16 20:51:09 1999
7589 DENY_WRITE RDONLY NONE /home/samba/quicken/qversion.dll Sun May 16 21:20:33 1999
7470 DENY_WRITE RDONLY NONE /home/samba/quicken/qversion.dll Sun May 16 20:51:11 1999
Share mode memory usage (bytes):
1043432(99%) free + 4312(0%) used + 832(0%) overhead = 1048576(100%) total
The Samba status from this output provides three sets of data, each divided into separate sections. The first section tells which systems have connected to the Samba server, identifying each client by its machine name (
phoenix
and
chimaera
) and IP address. The second section reports the name and status of the files that are currently in use on a share on the server, including the read/write status and any locks on the files. Finally, Samba reports the amount of memory it has currently allocated to the shares that it administers, including the amount actively used by the shares plus additional overhead. (Note that this is not the same as the total amount of memory that the
smbd or
nmbd processes are using.)
Don't worry if you don't understand these statistics; they will become easier to understand as you move through the book.