Libsmbclient - listing workgroups timeout

Henrik Zagerholm henke at
Thu Nov 9 09:05:55 GMT 2006

Hello Derrell,

Thanks again for your thorough answers. =)

I tried setting max_lmb_count=1 on a little special network and  
instead of returning about 5 MBs it returned 0. To the defense I can  
say that this network is really weird...

After some testing it seems that the total timeout is not  
max_lmb_count*timeout. Putting timeout=1000 and the max_lmb_count=2  
still took about 15 secs to complete instead of about 2 secs.

I'll go with your suggestions (sort of) and putting standard  
max_lmb_count=2 and maybe a timeout of about 5000 even though I can't  
confirm that the timeout has any impact at all. :)

Let me know if you have any other suggestions.


7 nov 2006 kl. 19:16 skrev derrell at

> Henrik Zagerholm <henke at> 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