[Samba] smbstatus - switched off computers are sometimes showed
Vlastimil Šetka
setka at spsostrov.cz
Fri Sep 19 20:02:02 GMT 2008
I have a Samba server configured as PDC for ~100 computers. It's version
3.0.24 running on Debian Etch (distribution package).
I want to write a tool for user logon/logoff tracking. Because parsing
log files is hard job (windows frequently disconnets or connects during
user session or etc.) I decide to use smbstatus output which seem to be
reliable.
So I run smbstatus binary every 10 seconds, parse the output and all is
fine. But sometimes in the smbstatus output is show computer which is
several hours switched off. At the next run (after 10s) this record is
not presented. Sometimes this "ghost" record is shown for ~30 seconds.
Example:
11:10:21 - MACHINE1/USER1 - is in smbstatus
... constantly is in smbstatus
12:14:11 - MACHINE1/USER1 - is NOT in smbstatus
12:15:21 - MACHINE1/USER2 - is in smbstatus
...
12:45:31 - MACHINE1/USER2 - is NOT in smbstatus
Now the MACHINE1 is switched off.
18:16:21 - MACHINE1/USER1 - is in smbstatus !! (and the MACHINE1 is
switched off several hours!)
18:16:31 - MACHINE1/USER1 - is NOT in smbstatus
Sometimes (cca twice a day) smbstatus return error output like this:
tdb(/var/run/samba/sessionid.tdb): rec_read bad magic 0xd9fee666 at
offset=116988
It's a bug or a feature and smbstatus is only informative? It's solved
in some newer version? Can you tell me about better source for connected
user status?
Thanks.
More information about the samba
mailing list