This is an old revision of the document!


Description of sensorAlarm

SensorAlarm pools the database filled by readsensor and checks for alarm conditions. Alarms are given based on criteria. The table with all criteria and actions is given below.

Location of the code

The code for sensorAlarm can be found in CVS, in the module wsrt_mac/alarms. The following files are used by the sensorAlarm program:

  • alarmActions.py → class to execute shell-commands and send mail to the observer on duty.
  • class_sensorAlarm.py → class that does most of the things
  • DBConnection.py → class for interfacing with a MySQL database
  • log.py → class to write to a logfile
  • sensorAlarm.py → Main program

Class layout

alarmActions class

The alarmActions class handles the execution of shell-commands. It provides a mechanism to stop a command after it has been running for a certain amount of time (timeout). The default timeout is one second.

In case of problems with executing a command (timeout, or a non-zero exit status) the observer will be notified by email/SMS. This uses the sendMail program.

Logmessages are written to a logfile (see class log.py).

Alarmconditions

This is the Alarm conditions table that is used in the software. It originates from the file /wsrt/config/alarmconditions.cfg on wop33.

Sensor Type/Unit Alarm Condition(s) Nr. of samples Mail/SMS who (Software) Action
CCwarm Temp/C > 25 5 obs send mail/SMS
> 28 5 obs send mail/SMS
< 15 5 obs send mail/SMS
CCcold Temp/C
PUMAwarm Temp/C > 28 5 obs send mail/SMS
> 31 5 obs send mail/SMS
< 15 5 obs send mail/SMS
PUMAcold Temp/C
DZBwarm Temp/C > 27 5 obs send mail/SMS
> 30 5 obs send mail/SMS
< 15 5 obs send mail/SMS
DZBcold Temp/C
CONSwarm Temp/C > 27 5 obs send mail/SMS
> 30 5 obs send mail/SMS
< 15 5 obs send mail/SMS
CONScold Temp/C
WATERcold Temp/C
WATERwarm Temp/C > 15 5 obs send mail/SMS
> 18 5 obs send mail/SMS
< 10 5 obs send mail/SMS
CVwarm Temp/C
Sup-He-RTx + Ret-He-RTx Pres/bar < 15 5 obs, stiepel send mail/SMS
PumpMain rpm/% ??? ??? obs send mail/SMS
PumpCC rpm/% ??? ??? obs send mail/SMS
PumpDZB rpm/% ??? ??? obs send mail/SMS
PumpPuma rpm/% ??? ??? obs send mail/SMS
PumpConsole rpm/% ??? ??? obs send mail/SMS
Compressor Power/Kw ??? ???
Brand1 Status 0 1 obs send mail/SMS
Brand2 Status 0 1 obs send mail/SMS
Inbraak Status 0 1 obs send mail/SMS
Net Status 0 1 obs send mail/SMS
CompressorSwitch Status 0 1 obs send mail/SMS
MainPump Status 0 1 obs send mail/SMS
SectorPumps Status 0 1 obs send mail/SMS
Cv Status 0 1 obs send mail/SMS

QR Code
QR Code wsrtinfo:sensoralarmdescription (generated for current page)