summaryrefslogtreecommitdiffstats
path: root/contrib/aix/pg_stat
diff options
context:
space:
mode:
authorEthan Galstad <egalstad@users.sourceforge.net>2002-02-28 06:42:51 (GMT)
committerEthan Galstad <egalstad@users.sourceforge.net>2002-02-28 06:42:51 (GMT)
commit44a321cb8a42d6c0ea2d96a1086a17f2134c89cc (patch)
treea1a4d9f7b92412a17ab08f34f04eec45433048b7 /contrib/aix/pg_stat
parent54fd5d7022ff2d6a59bc52b8869182f3fc77a058 (diff)
downloadmonitoring-plugins-44a321cb8a42d6c0ea2d96a1086a17f2134c89cc.tar.gz
Initial revision
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'contrib/aix/pg_stat')
-rw-r--r--contrib/aix/pg_stat45
1 files changed, 45 insertions, 0 deletions
diff --git a/contrib/aix/pg_stat b/contrib/aix/pg_stat
new file mode 100644
index 0000000..e0603ec
--- /dev/null
+++ b/contrib/aix/pg_stat
@@ -0,0 +1,45 @@
1#!/bin/ksh
2
3#==============================================================================
4# Script was originally created to collect stats and dump then to a log file
5# every five minutes. But we like this better (the log file thing is still
6# good if you want to track availability).
7#
8# Authors: SpEnTBoY
9# TheRocker
10#
11# Email: lonny@abyss.za.org
12# therocker@pawprints.2y.net
13#==============================================================================
14
15#=========================================================================================
16#
17# The best way to do this is to use Kerberos but we use rsh here because our monitoring
18# workstation doesn't have Kerberos installed. In order for this to work, the remote
19# host ($1) must have a .rhosts file that contains a line like:
20#
21# monitorhost nagiosuser
22#
23#=========================================================================================
24
25PAGING2=`rsh $1 -l root lsps -a -s | grep -v Paging | tr -s ' '| cut -d' ' -f3 | cut -d'%' -f1`
26
27
28if [ "$PAGING2" -gt "35" ] && [ "$PAGING2" -lt "50" ]
29then
30 echo "Paging Space is over 35% ("$PAGING2")%"
31exit 1
32fi
33
34if [ "$PAGING2" -gt "49" ]
35then
36 echo "WARNING! Paging Space is over 50% ("$PAGING2")%"
37exit 2
38fi
39
40if [ "$PAGING2" -lt "34" ]
41then
42 echo "Paging Space is less than 34% ("$PAGING2")%"
43exit 0
44fi
45