I think think of a number of overly complicated mechanisms, but on the
simple side, why not run a cron job once a minute to see if the daemons
are still up. Doing a 'ps' won't tell you if a daemon is hung, but
it
will tell you if there's a process allocated.
Another option is to telnet to port 139 on the SAMBA host. You can do
that inside an expect script. The command should be:
echo "hello" | telnet localhost 139
Send only "hello" which does not have any detrimental effects. Use
expect to look for a connected and a connection closed message. If
there is no smb daemon listening on the port you'll get a connection
refused message instead. You can then run the expect script out of
cron.
A third alternative would be to write a small perl script to do the
connection test. That's actually the method I would recommend. It too
can be run out of cron. You could have the script send email if it
fails to connect, and if you have using a cell phone or pager service
that can process email, you can literally have the script beep you
wherever you are.
-- Rob
--On 10/16/00 08:00:08 PM +0300 demir <samba@yfas.com.tr> wrote:
> I need a connection watching tool for Linux Samba server more
> functional then status option of SWAT. I search the archive of
> mailing list but I only find a suggestion to use KDE Control Center,
> but I couldn't see any tool in it for connection.
>
>
>
>
_ _ _ _ _ _ _ _ _ _
/\_\_\_\_\ /\_\ /\_\_\_\_\_\
/\/_/_/_/_/ /\/_/ \/_/_/_/_/_/ QUIDQUID LATINE DICTUM SIT,
/\/_/__\/_/ __ /\/_/ /\/_/ PROFUNDUM VIDITUR
/\/_/_/_/_/ /\_\ /\/_/ /\/_/
/\/_/ \/_/ /\/_/_/\/_/ /\/_/ (Whatever is said in Latin
\/_/ \/_/ \/_/_/_/_/ \/_/ appears profound)
Rob Tanner
UNIX and Networks Manager
Linfield College, McMinnville OR
(503) 434-2558 <rtanner@linfield.edu>