How to best monitor SAMBA

Christoph Doerbeck A242369 cdoerbec at cso.fmr.com
Tue Oct 16 17:05:19 EDT 2001


I found that I got good results by using 

	smbclient '\\servername\share\' -c quit > /dev/null 2>&1

If smbclient connects, it simply execute the quit command and returns 0
If smbclient fails, it returns 1

This is on samba-1.9.18p10 which is old (i know) but what the vender
provides and supports.

Derek Atkins wrote:
> You can test it using smbmount, perhaps?
> 
> -derek
> 
> Christoph Doerbeck A242369 <cdoerbec at cso.fmr.com> writes:
> 
> > I would like to develop a simple script to test whether or
> > not SAMBA is running and properly sharing a resource.
> > 
> > The script would need to exit 0 on OK, and 1 on FAILURE.


-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list