libsmbclient.so speed
Alistair Hopkins
alistair at berthengron.co.uk
Fri May 9 08:19:24 GMT 2003
That's what I thought - but I can't find any reference on what and where
that configuration data should be!
Also, although it will run as part of nagios, the speed issue is there
however I run it - it's just an executable and I've been running it in the
normal environment and still haveing the speed issues.
I thought it was probably due to:
1/ libsmbclient checking all existing contexts to see if a new connection
is required
or
2/ inefficient auth chatter due to Win weirdness
If 1/, I would like to force the API to establish a new context as I know
that it doesn't exist already.
Al
-----Original Message-----
From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen at ml.com]
Sent: 08 May 2003 23:07
To: 'Alistair Hopkins'; smb-clients at lists.samba.org
Subject: RE: libsmbclient.so speed
Since your program is running in the nagios environment libsmbclient is
probably failing
to find some configuration data that results in a timeout. Just a guess
though.
> -----Original Message-----
> From: Alistair Hopkins [SMTP:alistair at berthengron.co.uk]
> Sent: Thursday, May 08, 2003 11:05 AM
> To: smb-clients at lists.samba.org
> Subject: libsmbclient.so speed
>
> Afternoon,
>
> I have written a little C program to use libsmbclient.so an a RH8 linux
box
> to check the status of files on a series of remote (Win2k) computers.
It's
> actually to run as a Nagios monitoring plugin.
>
> The steps I take are:
> smbc_init(get_auth_data, 0)
> then
> smbc_opendir(logdir)
> then I iterate through the dirents and get the information I need.
>
> logdir is a samba URL of type smb://192.168.1.1/share/my/dir/path/
>
> The script reliably produces the correct result. However, the
smbc_opendir
> is incredibly slow - 10 seconds or more when the box is on my LAN - I get
a
> far faster result using smbclient with -c to list the directory.
>
> This kind of defeats the object, which is to be nice to my monitoring
> server.
>
> Is this because the smb.conf I have in ~/.smb/ is empty? I can't see that
> any of the options in the example smb.conf files are relevant to
> libsmbclient.so. And is it true that there's a smbclient.conf file you
can
> use? Google has two pages of references, but they seem to be for specific
> applications and I can't find any generic documentation.
>
> Or should I be using the context stuff? Or even the cli_open as used in
the
> smbclient.c? testsmb.c doesn't use them, so I just copied that...
>
> Help much appreciated...
>
> Thanks,
>
> Al
>
>
More information about the smb-clients
mailing list