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).
11 # Email: lonny@abyss.za.org
12 # therocker@pawprints.2y.net
13 #==============================================================================
15 #=========================================================================================
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:
21 # monitorhost nagiosuser
23 #=========================================================================================
25 PAGING2
=`rsh $1 -l root lsps -a -s | grep -v Paging | tr -s ' '| cut -d' ' -f3 | cut -d'%' -f1`
28 if [ "$PAGING2" -gt "35" ] && [ "$PAGING2" -lt "50" ]
30 echo "Paging Space is over 35% ("$PAGING2")%"
34 if [ "$PAGING2" -gt "49" ]
36 echo "WARNING! Paging Space is over 50% ("$PAGING2")%"
40 if [ "$PAGING2" -lt "34" ]
42 echo "Paging Space is less than 34% ("$PAGING2")%"