libsmbclient.so speed
Allen, Michael B (RSCH)
Michael_B_Allen at ml.com
Thu May 8 22:06:37 GMT 2003
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