Libsmbclient - listing workgroups timeout

derrell at samba.org derrell at samba.org
Tue Nov 7 18:16:04 GMT 2006


Henrik Zagerholm <henke at mac.se> writes:

> Hello list,
>
> We are having trouble with listing workgroups and setting a timeout  at the
> same time.
> It feels that the open call on "smb://" does not honor the timeout  setting.
> The only thing that affect the time spent searching for workgrousp/ domains
> seems to be to set the options.browse_max_lmb_count.
>
> Is there someway to have a high lmb_count but still be able to set a  shorter
> timeout?

Hi Henrik,

The connections to each of the master browser are done serially.  The
connection to each master browser has the timeout you've provided, so the
maximum time if all of the master browsers timeout is about lmb_count*timeout.

You can decrease the per-connection timeout for the workgroup enumeration to
your original_timeout/lmb_count to account for the serial nature of the
connections and enumeration requests, but you'll likely have a too-short
timeout for the server enumeration request to each master browser, and your
results will be unpredictable.

If you are working with a stable network (ha!!), then lmb_count=1 is adequate.
All of the master browsers, in theory, synchronize with the others.  You need
a larger lmb_count (preferably as large as the number of workgroups there are)
if master browsers are potentially crashing or being shut down regularly.

Derrell


More information about the samba-technical mailing list