diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-02 13:16:24 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-02 13:16:24 +0200 |
commit | b15adb7762b6caaecaa83637abfcf5fdb4802092 (patch) | |
tree | 64eddbe2aa1a7f98a140be0f7973f05d7a781ae0 /contrib/aix/check_io | |
parent | c4d5882b9e1d07c7b61091062b7d085fa5f00284 (diff) | |
download | monitoring-plugins-b15adb7762b6caaecaa83637abfcf5fdb4802092.tar.gz |
Remove "contrib" plugins
These days, sites such as "Nagios Exchange" are a much better place for
publishing plugins not maintained by the Plugins Development Team.
Diffstat (limited to 'contrib/aix/check_io')
-rw-r--r-- | contrib/aix/check_io | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/contrib/aix/check_io b/contrib/aix/check_io deleted file mode 100644 index 58b25f6d..00000000 --- a/contrib/aix/check_io +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | #================================================================= | ||
4 | # | ||
5 | # I/O Checker (KBPS) | ||
6 | # This Script uses iostat to monitor disk io | ||
7 | # Useful for notifications of disk thrashing. | ||
8 | # | ||
9 | # Authors: TheRocker | ||
10 | # SpEnTBoY | ||
11 | # | ||
12 | # Email: therocker@pawprints.2y.net | ||
13 | # lonny@abyss.za.org | ||
14 | # | ||
15 | #================================================================ | ||
16 | |||
17 | NUMBER1=`rsh $1 -l root iostat -d | grep -e "hdisk" | tr -s ' ' | cut -d' ' -f2 | sort -2 -r | cut -c1 | line` | ||
18 | NUMBER2=`rsh $1 -l root iostat -d | grep -e "hdisk" | tr -s ' ' | cut -d' ' -f2 | sort -2 -r | cut -c2 | line` | ||
19 | TMPFILE=/tmp/iotest.hndl | ||
20 | TMPTOO=/tmp/iotwo.hndl | ||
21 | |||
22 | #=========================================================== | ||
23 | # | ||
24 | # We do an evaluation on $NUMBER1 and $NUMBER2 to see if | ||
25 | # disk io is exceeding 40%. | ||
26 | # | ||
27 | #=========================================================== | ||
28 | |||
29 | if [ "$NUMBER1" -gt 4 ] && [ "$NUMBER2" -gt 0 ] | ||
30 | then | ||
31 | |||
32 | `rsh $1 -l root iostat -d | grep -v cd0 | tr -s ' '| cut -d' ' -f1,2 | grep -e "4[0-9]." >> $TMPFILE` | ||
33 | |||
34 | #==================================================================== | ||
35 | # | ||
36 | # Of course, there may be more than one hard disk on the node | ||
37 | # so we use this bit of code to report on more than one instance | ||
38 | # of excessive disk IO. | ||
39 | # | ||
40 | #==================================================================== | ||
41 | |||
42 | LINES=`wc -l /tmp/iotest.hndl | cut -c8` | ||
43 | LINESCTL=`wc -l /tmp/iotest.hndl | cut -c8 ` | ||
44 | echo "WARNING!!! Disk I/O Exceeding 40% on --> \c" | ||
45 | |||
46 | while [ $LINESCTL != 0 ] | ||
47 | do | ||
48 | |||
49 | cat $TMPFILE | tail -$LINESCTL > $TMPTOO | ||
50 | cat $TMPTOO > $TMPFILE | ||
51 | LINESCTL=$(( $LINESCTL -1 )) | ||
52 | LINES=$(( $LINES -1 )) | ||
53 | DATA=`head -1 /tmp/iotest.hndl` | ||
54 | echo "( $DATA ) " | ||
55 | |||
56 | |||
57 | done | ||
58 | echo "\n" | ||
59 | |||
60 | rm -f $TMPFILE | ||
61 | rm -f $TMPTOO | ||
62 | exit 1 | ||
63 | |||
64 | else | ||
65 | |||
66 | print "No Disk I/O Exceeding 40%...OK" | ||
67 | exit 0 | ||
68 | |||
69 | fi | ||