Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to best monitor SAMBA



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).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org