libsmbclient.so speed

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Wed May 14 23:09:10 GMT 2003


Well it's a little difficult for me to see what's happening with only
tcpdump output. An Ethereal capture would be much better. But I think
you're on the right track. It's not trying different ports though. It's simply
trying the netbios-ssn port (139) but failing to get a response so after
20 seconds it tries again and succeeds. I'd really need a full blown
pcap or netmon capture to see what's happing.  But even then, I'm not
familar with the libsmbclient code so it may not be obvious to me what
the ultimate problem is if you do come up with a pcap.

Mike

> -----Original Message-----
> From:	Alistair Hopkins [SMTP:alistair at berthengron.co.uk]
> Sent:	Wednesday, May 14, 2003 5:33 AM
> To:	smb-clients at lists.samba.org
> Subject:	RE: libsmbclient.so speed
> 
> Hi, sorry about the delay but...
> 
> Here's a tcpdump of what happens during a request - it looks as though it takes three attempts for libsmbclient to get through, with a different local port in each case (10:14:05 and 10:14:25).  I
> have done this a number of times and it is always three ports to get  result, with the long (10s +) gap between the different tries.  When I compare with using smbclient, it also uses three ports
> but doesn't have the the ten second + gap between them - I guessthere's a single config line I can write to tell libsmbclient.so how long to wait between retries (or whatever they are!) but I can't
> find any reference!
> 
> Below that is a slightly clipped version of the code (auth_fn removed).  It uses the fact that a piece of software on these boxes should write to log more than every fifteen minutes and when frozen,
> don't do that.  This is a cheap way of monitoring the software until we get something a little more net-friendly...   It initialises smbclient, opens a log directory, then iterates through the
> entries cat'ing those with names that match the log file and getting the most recently written one  (the logs rotate) then deciding if it's too old.
> 
> Any suggestions welcome!
> 
> Alistair
> 
>  
> 
> 10:13:34.681112 192.168.1.5.3794 > 10.1.1.12.netbios-ssn: S 3060113901:3060113901(0) win 64512 <mss 1406,nop,nop,sackOK> (DF)
> 10:13:45.272951 192.168.1.3.32772 > 192.168.1.5.netbios-ssn: P 2085402939:2085403043(104) ack 2626344319 win 11152 <nop,nop,timestamp 1647272 5756415>NBT Packet (DF)
> 10:13:45.274936 192.168.1.5.netbios-ssn > 192.168.1.3.32772: P 1:87(86) ack 104 win 63438 <nop,nop,timestamp 5758603 1647272>NBT Packet (DF)
> 10:13:45.275016 192.168.1.3.32772 > 192.168.1.5.netbios-ssn: . ack 87 win 11152 <nop,nop,timestamp 1647273 5758603> (DF)
> 10:13:45.275090 192.168.1.3.32772 > 192.168.1.5.netbios-ssn: P 104:172(68) ack 87 win 11152 <nop,nop,timestamp 1647273 5758603>NBT Packet (DF)
> 10:13:45.275994 192.168.1.5.netbios-ssn > 192.168.1.3.32772: P 87:140(53) ack 172 win 63370 <nop,nop,timestamp 5758603 1647273>NBT Packet (DF)
> 10:13:45.315018 192.168.1.3.32772 > 192.168.1.5.netbios-ssn: . ack 140 win 11152 <nop,nop,timestamp 1647294 5758603> (DF)
> 10:14:05.461631 192.168.1.3.32797 > 192.168.1.5.netbios-ssn: S 3932903551:3932903551(0) win 5840 <mss 1460,sackOK,timestamp 1657609 0,nop,wscale 0> (DF)
> 10:14:05.462150 192.168.1.5.netbios-ssn > 192.168.1.3.32797: S 3070080661:3070080661(0) ack 3932903552 win 64512 <mss 1406,nop,wscale 0,nop,nop,timestamp 0 0,nop,nop,sackOK> (DF)
> 10:14:05.462200 192.168.1.3.32797 > 192.168.1.5.netbios-ssn: . ack 1 win 5840 <nop,nop,timestamp 1657609 0> (DF)




More information about the smb-clients mailing list