Date: Thu, 25 Sep 2008 13:00:15 -0500 From: "Bob McClure" <h8msft@gmail.com> To: freebsd-cluster@freebsd.org, h8msft@gmail.com Subject: Re: CARP Status Message-ID: <dd2bb6b50809251100g5f314555t17466af01f920ac4@mail.gmail.com> In-Reply-To: <200809241623.m8OGN1pc019567@lurza.secnetix.de> References: <dd2bb6b50809231231x78d706c2hd5b8958fc402d2@mail.gmail.com> <200809241623.m8OGN1pc019567@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks to all for your input. With this many options on the table, I'm sure one of them will meet my needs. Thanks boB On Wed, Sep 24, 2008 at 11:23 AM, Oliver Fromme <olli@lurza.secnetix.de>wro= te: > Bob McClure <> wrote: > > I have several servers running CARP in an active/passive configuration= . > > Currently the only way that my scripts can determine if a given node i= s > > master is by > > periodically executing ifconfig carp1 and grepping for MASTER. Althoug= h > this > > works, > > it's kind of clunky. > > > > Is there a better way to detect the CARP status of a server? > > If you set sysctl net.inet.carp.log=3D2, you'll get a log > entry every time the interface state changes. You can > configure a handler (e.g. a script) in /etc/syslog.conf > that responds to such events. > > If you're a C programmer, you can also use the kqueue(2) > API with EVFILT_NETDEV. Then you will get a notification > each time an interface link goes down or comes up. See > the kqueue(2) manual page for details. > > Finally, a third possibility is to use devd(8). See the > devd.conf(4) manual page for details. > > Best regards > Oliver > > -- > Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. > Handelsregister: Registergericht Muenchen, HRA 74606, Gesch=E4ftsfuehrun= g: > secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M=FC= n- > chen, HRB 125758, Gesch=E4ftsf=FChrer: Maik Bachmann, Olaf Erb, Ralf Geb= hart > > FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd > > "Python is an experiment in how much freedom programmers need. > Too much freedom and nobody can read another's code; too little > and expressiveness is endangered." > -- Guido van Rossum >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?dd2bb6b50809251100g5f314555t17466af01f920ac4>