ciss(4) driver in FreeBSD 6.x ...

Holger Kipp hk at alogis.com
Fri Nov 25 13:17:59 GMT 2005


On Fri, Nov 25, 2005 at 11:10:47AM +0100, Sascha Holzleiter wrote:
> Hi,
> 
> thanks for the input on this.
> 
> On Thu, Nov 24, 2005 at 11:08:28PM +0100, kama wrote:
> > > > do you know of any method to monitor these [ciss] controllers with FreeBSD,
> > > > e.g. to detect drive failures?
> > >
> > > You could simply monitor the corresponding ciss syslog-messages
> > > and scan for state changes (ie from OK to something else). Apart
> > > from reboot-messages, you only get messages if states are
> > > changing...
> 
> This is what is done already but I always wanted to watch the drives
> directly. The camcontrol approach seems to satisfy this.

Well, that requires active testing every few minutes. You could instead
make an appropriate entry in syslog.conf to pipe ciss-related entries
into a program of your choice, so you get instant feedback ;-)

Regards,
Holger Kipp

see man syslog.conf, action field description:
---
     o   A vertical bar (``|''), followed by a command to pipe the selected
         messages to.  The command is passed to sh(1) for evaluation, so usual
         shell metacharacters or input/output redirection can occur.  (Note
         however that redirecting stdio(3) buffered output from the invoked
         command can cause additional delays, or even lost output data in case
         a logging subprocess exited with a signal.)  The command itself runs
         with stdout and stderr redirected to /dev/null.  Upon receipt of a
         SIGHUP, syslogd(8) will close the pipe to the process.  If the
         process did not exit voluntarily, it will be sent a SIGTERM signal
         after a grace period of up to 60 seconds.

         The command will only be started once data arrives that should be
         piped to it.  If it exited later, it will be restarted as necessary.
         So if it is desired that the subprocess should get exactly one line
         of input only (which can be very resource-consuming if there are a
         lot of messages flowing quickly), this can be achieved by exiting
         after just one line of input.  If necessary, a script wrapper can be
         written to this effect.

         Unless the command is a full pipeline, it is probably useful to start
         the command with exec so that the invoking shell process does not
         wait for the command to complete.  Warning: the process is started
         under the UID invoking syslogd(8), normally the superuser.
---


More information about the freebsd-stable mailing list