How can I monitor my Samba traffic?

I've got a directory shared on my network, using Samba. People on the netwerk use this Samba share to download files from my share to their computers. I'm interested in what files are downloaded most, and by which users they are downloaded. I'd like to see this in real time, if possible. Is there a program that allows me to do this? If yes, how can I use it?

I'm using Ubuntu 11.10.


Solution 1:

just try next :

sudo watch smbstatus

This will continually redisplay a CLI status of SMB connections, like 'top'.

Solution 2:

You can get Samba to log stuff like that. Check the Samba man pages, via man -k samba. Read man smb.conf and see the sections Log File and Log Level