diff options
author | brueffer <brueffer@FreeBSD.org> | 2006-03-02 14:44:19 +0000 |
---|---|---|
committer | brueffer <brueffer@FreeBSD.org> | 2006-03-02 14:44:19 +0000 |
commit | 04a5ecea5708248680488864681831511ce72671 (patch) | |
tree | 947a680934fbb1aed1a3ce6b8ca276dfb7bc84c3 /etc | |
parent | fadd1c87d96362a7f2849e3fea8a79fd39d7e1ac (diff) | |
download | FreeBSD-src-04a5ecea5708248680488864681831511ce72671.zip FreeBSD-src-04a5ecea5708248680488864681831511ce72671.tar.gz |
Add periodic scripts that check the status of graid3(8), gstripe(8)
and gconcat(8) devices, respectively.
Approved by: rwatson (mentor)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/periodic/daily/407.status-graid3 | 34 | ||||
-rw-r--r-- | etc/periodic/daily/408.status-gstripe | 34 | ||||
-rw-r--r-- | etc/periodic/daily/409.status-gconcat | 34 | ||||
-rw-r--r-- | etc/periodic/daily/Makefile | 3 |
4 files changed, 105 insertions, 0 deletions
diff --git a/etc/periodic/daily/407.status-graid3 b/etc/periodic/daily/407.status-graid3 new file mode 100644 index 0000000..52750f7 --- /dev/null +++ b/etc/periodic/daily/407.status-graid3 @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_graid3_enable" in + [Yy][Ee][Ss]) + echo + echo 'Checking status of graid3(8) devices:' + + if graid3 status; then + components="$(graid3 status -s | fgrep -v COMPLETE)" + if [ "${components}" ]; then + rc=3 + else + rc=0 + fi + else + rc=2 + fi + ;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/408.status-gstripe b/etc/periodic/daily/408.status-gstripe new file mode 100644 index 0000000..ff74f76 --- /dev/null +++ b/etc/periodic/daily/408.status-gstripe @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_gstripe_enable" in + [Yy][Ee][Ss]) + echo + echo 'Checking status of gstripe(8) devices:' + + if gstripe status; then + components="$(gstripe status -s | fgrep -v UP)" + if [ "${components}" ]; then + rc=3 + else + rc=0 + fi + else + rc=2 + fi + ;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/409.status-gconcat b/etc/periodic/daily/409.status-gconcat new file mode 100644 index 0000000..7dfa918 --- /dev/null +++ b/etc/periodic/daily/409.status-gconcat @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_gconcat_enable" in + [Yy][Ee][Ss]) + echo + echo 'Checking status of gconcat(8) devices:' + + if gconcat status; then + components="$(gconcat status -s | fgrep -v UP)" + if [ "${components}" ]; then + rc=3 + else + rc=0 + fi + else + rc=2 + fi + ;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/Makefile b/etc/periodic/daily/Makefile index 3848690..f356afa 100644 --- a/etc/periodic/daily/Makefile +++ b/etc/periodic/daily/Makefile @@ -14,6 +14,9 @@ FILES= 100.clean-disks \ 400.status-disks \ 405.status-ata-raid \ 406.status-gmirror \ + 407.status-graid3 \ + 408.status-gstripe \ + 409.status-gconcat \ 420.status-network \ 430.status-rwho \ 440.status-mailq \ |