[Bug 886953] Re: smbstatus does not reliably detect that a samba connection is in use.
Bug Watch Updater
886953 at bugs.launchpad.net
Wed Nov 21 04:51:05 UTC 2012
** Changed in: samba
Status: Unknown => Invalid
** Changed in: samba
Importance: Unknown => Medium
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to samba in Ubuntu.
https://bugs.launchpad.net/bugs/886953
Title:
smbstatus does not reliably detect that a samba connection is in use.
Status in Samba:
Invalid
Status in “samba” package in Ubuntu:
Invalid
Bug description:
I have a file server, built to be solar powered. It is powered up by
a WOL magic packet, and a little daemon I have written starts to count
down. When it gets to zero it suspends. Every second the daemon
monitors for valid activity and restarts the countdown if the server
is in use. The indications of valid activity are : 'who' count > 0,
number of rysnc running >0, and number of active samba connections
open >0.
Details
---------
It is the samba connection that is causing me trouble. The test is actually `smbstatus | grep \: -c`. It ignores the various header lines in the default smbstatus output, and counts those with a time delimiter as active connections.
This works fine with a Windows client, and used to work fine with an
Ubunutu client, but that second case is no longer true. I have two
text files which tell the story: with a windows client closing the
windows file explorer closes the last connection. In Ubuntu, closing
the Natuilus file explorer leaves the last connection running. If go
to look at /proc/<process no>/net/tcp it is not changing. So there is
no traffic, but the connection is still open.
If I kill either the process listed in smbstatus at the server end, or
the one listed as gvfsd-smb at the client end, then it all settles
down and no harm is done: the countdown resumes because of my
smbstatus | grep test, and if I try to open a new connection it opens
normally.
I cannot differentiate when samba is in use or idle when the client is
Ubuntu, only when it is Windows.
Question
-------------
So that is my question:
How, at the server end, do I reliably detect that a samba connection is in use?
Supplementary
------------------
Out of curiosity:
Why does samba lock directories when opened in a client windows file navigator, but not an ubuntu one?
Why does samba not lock a text file when opened with a text editor from either type of client?
========================================
I cannot attach files, so I will add them as subsequent comments
=======================================
To manage notifications about this bug go to:
https://bugs.launchpad.net/samba/+bug/886953/+subscriptions
More information about the foundations-bugs
mailing list