Re: Script to monitor paging space utilization

From: Bill Thompson (bill.thompson@GOODYEAR.COM)
Date: Wed Mar 19 2003 - 06:42:54 EST


Dave,

Here's what I use:

- - - - - snip - - - - -
#!/bin/sh

    SWAP_USED=$(lsps -s | tail -1 | awk '{print $2}' | sed -e 's/%//')

    (( SWAP_USED < 80 )) && exit 0

    (print "Subject: Check Swap On HQGBI7T1"
     print "From: root\n\n"
     print "Swap space on hqgbi7t1 is ${SWAP_USED}% used\n"
    ) | sendmail bill.thompson@goodyear.com
- - - - - snip - - - - -

I run it out of cron every 15 minutes:

  05,20,35,50 * * * * /usr/local/bin/check.swap 1>/dev/null 2>&1

Bill Thompson
Sr UNIX Systems Administrator
The Goodyear Tire & Rubber Co.

Contains Confidential and/or Proprietary Information
May Not Be Copied or Disseminated Without Express Consent of The Goodyear
Tire & Rubber Company.

AIX-L Archives: http://marc.theaimsgroup.com/?l=aix-l&r=1&w=2

-----Original Message-----
From: Miller, Dave ( I.S.) [mailto:Dave.Miller@BHS.ORG]
Sent: Tuesday, March 18, 2003 3:32 PM
To: aix-l@Princeton.EDU
Subject: Script to monitor paging space utilization

Anyone have or know of a simple script that monitors paging space
utilization automatically...i.e. emails or pages etc. if it exceeds a given
threshold? Thanks.

Blue Cross Blue Shield of Florida, Inc., and its subsidiary and
affiliate companies are not responsible for errors or omissions in this
e-mail message. Any personal comments made in this e-mail do not reflect
the views of Blue Cross Blue Shield of Florida, Inc.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:40 EDT