Re: [foxboro] How to alarm system maintanence items

  • From: Theresa Franks <theresa_franks@xxxxxxxxxxxx>
  • To: foxboro@xxxxxxxxxxxxx
  • Date: Mon, 3 May 2004 07:14:11 -0500



Thanks Alex
                                             
 (Embedded image Theresa Franks              
 moved to file:  I&E DCS/PLC Supervisor,     
 pic29168.gif)   Huntsman JCO                
 aniflagwave.gif Phone: (409) 724-4635       
 (3201 bytes)    Pager: (409) 749-2859       
                 Fax: (409) 723-3809         
                 E-mail:                     
                 theresa_franks@xxxxxxxxxxxx 
                                             








                                                                                
                                                        
                      "Johnson, Alex                                            
                                                        
                      (Foxboro)"               To:       foxboro@xxxxxxxxxxxxx  
                                                        
                      <ajohnson@Foxboro        cc:                              
                                                        
                      .com>                    Subject:  [foxboro] How to alarm 
system maintanence items                                
                      Sent by:                                                  
                                                        
                      foxboro-bounce@fr                                         
                                                        
                      eelists.org                                               
                                                        
                                                                                
                                                        
                                                                                
                                                        
                      04/30/04 05:02 PM                                         
                                                        
                      Please respond to                                         
                                                        
                      foxboro                                                   
                                                        
                                                                                
                                                        
                                                                                
                                                        




I thought I'd pass this along to the list.

I was asked how one might generate a page when a disk drive fills (or any
other event one can detect).

The page part is easy enough - buy and use FoxPage or a similar package.
(FoxPage is better. :))


However, this customer was somewhat confused as to how to generate the
desired alarm. I thought that might be of use to the (list) reading public
so, here you go.

I have been a number of plants where a similar approach is used for a
morning report on the system health. A script gathers the data and puts it
in a file. When complete, textedit is launched with the file as is command
line argument.

Anyway, hope this is useful.


Regards,

Alex Johnson
Invensys Systems, Inc.
10707 Haddington
Houston, TX 77043
713.722.2859 (voice)
713.722.2700 (operator)
713.932.0222 (fax)
ajohnson@xxxxxxxxxxx
For the latest information on ArchestrA, go to
http://www.invensys.com/Archestra.html.


Q: How does one alarm disk space consumption and send a page as it fills?

A: The following command shows how to see what is available as a % of
capacity on a machine:

df -F ufs -k

The output is:

1AW51E# df -F ufs -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d0         52235   25235   21780    54%    /
/dev/md/dsk/d4        823363  429707  311326    58%    /usr
/dev/md/dsk/d2         37871    4140   29951    13%    /var
/dev/md/dsk/d5       7089336 2713095 3667311    43%    /opt
/dev/dsk/c0t1d0s2    8316189 4784185 2700394    64%    /drv1


You can extract the useful information as follows:

df -F ufs -k | grep opt | awk '{ print $5 }' | awk -F% '{ print $1 }'

The output is:

43

This can be stored in an environment variable as follows:

PCT_USED=` df -F ufs -k | grep opt | awk '{ print $5 }' | awk -F% '{ print
$1 }'`

The value (PCT_USED) can be sent to the MEAS parameter of a REALM block as
follows:

/opt/fox/bin/tools/omsetimp -f $PCT_USED DISK:OPT_USED.MEAS

This block can be configured to alarm, to re-alarm as it gets worse, to
alarm if it changes too fast, to generate a High-High alarm, etc.

These alarms can be used to send pages by configuring FoxPage as an alarm
destination for the messages.


A script can be written to do the whole thing:

#!/bin/sh
LOGS=/opt/foxind/scriptLogs
mkdir -p $LOGS
exec >$LOGS/`basename $0` 2>&1
for disk in "" USR VAR OPT DRV1
do
   PCT_USED=`df -F ufs -k | grep " /$disk\$" | awk '{ print $5 }' | awk -F%
'{ print $1 }'`
   /opt/fox/bin/tools/omsetimp -f $PCT_USED DISK:${disk}_USED.MEAS
done

This script assumes a compound call DISK with REALM blocks called :

_USED - for root
USR_USED - for /usr
VAR_USED - for /var
OPT_USED - for /opt
DRV1_USED - for /drv1


Once the script is written, you can schedule it with cron (or under XP the
XP scheduler).




_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html

foxboro mailing list:             //www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave




-- No attachments (even text) are allowed --
-- Type: image/gif
-- File: pic29168.gif


 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             //www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts:

  • » Re: [foxboro] How to alarm system maintanence items