13.2.1-10 baseline

Former-commit-id: 9880bba4c4a0fd8d3352036294745b5b9c0aa7d3
This commit is contained in:
Steve Harris 2013-02-25 10:11:00 -05:00
parent d6dc4694f0
commit acf2f8ff92
5 changed files with 36 additions and 15 deletions

View file

@ -59,7 +59,10 @@
# Relationship Type: In Response to
# Status: TEST
# Title: AvnFPS: tpo indicator not monitoring properly
#
#
# Date Ticket# Engineer Description
# ------------- ---------- ----------- --------------------------
# Feb. 21, 2013 15834 zhao Modified for CCFP 8hr data
#
import logging, time
import Avn, AvnLib, Globals, MonitorP
@ -68,10 +71,10 @@ import CCFPData
_Logger = logging.getLogger(__name__)
_Code = { \
'tops': {1: '370+ ', 2: '310-370', 3: '250-310'}, \
'gwth': {1: '++', 2: '+ ', 3: 'NC', 4: '- '}, \
'tops': {1: '400+ ', 2: '350-390', 3: '300-340', 4: '250-290'}, \
'gwth': {1: '+ ', 2: 'NC', 3: '- '}, \
'conf': {1: 'HIGH', 3: 'LOW'}, \
'cvrg': {1: '75-100%', 2: ' 50-74%', 3: ' 25-49%'}, \
'cvrg': {1: '75-100%', 2: ' 40-74%', 3: ' 25-39%'}, \
}
##############################################################################
@ -82,7 +85,7 @@ class Monitor(MonitorP.Monitor):
def __makeData(self, data):
# 6 hour forecast
tstart = (time.time()//3600.0 + 1) * 3600.0
tend = tstart + 7*3600.0 - 10.0
tend = tstart + 9*3600.0 - 10.0
seq = [{'time': t} for t in Avn.frange(tstart, tend, 3600.0)]
fcst, text = {}, []
try:

View file

@ -324,14 +324,20 @@ class H5pyDataStore(IDataStore.IDataStore):
deleteFile = False
try:
rootNode=f['/']
locs = request.getLocations()
for dataset in locs:
for loc in locs:
ds = None
try :
ds = self.__getNode(f, None, dataset)
# try deleting as dataset
ds = self.__getNode(rootNode, None, loc)
except Exception, e:
logger.warn('Unable to find uri [' + str(dataset) + '] in file [' + str(fn) + '] to delete: ' + IDataStore._exc())
try:
# try deleting as group
ds = self.__getNode(rootNode, loc, None)
except:
logger.warn('Unable to find uri [' + str(loc) + '] in file [' + str(fn) + '] to delete: ' + IDataStore._exc())
if ds:
grp = ds.parent
@ -353,6 +359,7 @@ class H5pyDataStore(IDataStore.IDataStore):
timeMap['closeFile']=t1-t0
if deleteFile:
logger.info('Removing empty file ['+ str(fn) + ']')
try:
os.remove(fn)
except Exception, e:

View file

@ -102,6 +102,9 @@ function captureQpidStat() {
local returnCode=0
local qpidConnLimit=500
local qpidConnMedAlarm=75
local qpidConnHighAlarm=40
local qpidConnCritAlarm=15
case "${platformName}" in
[a-z][a-z][a-z]n ) qpidConnLimit=1000 ; echo -e "\tNOTE: Setting Max qpidd connection to 1000 due to NCEP site" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out ;;
@ -111,20 +114,28 @@ function captureQpidStat() {
echoDate >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
echo -e "----------------------------------------------------------------|\n" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
# Send ITO alarm to NCF - Thank you Sean Bowser for your guidance here. You are wise.
numQpidConnections=$( qpid-stat -c | wc -l )
(( numQpidConnections-=3 ))
echo -e "Total Number of QPID Connections: ${numQpidConnections}" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
if [[ ${numQpidConnections} -ge $(( qpidConnLimit - 50 )) && ${numQpidConnections} -le $(( qpidConnLimit - 15 )) ]] ; then
echo -e "\tNOTE: Sending Major ITO to NCF because number of connections is between 450 and 485" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
if [[ ${numQpidConnections} -ge $(( qpidConnLimit - qpidConnMedAlarm )) && ${numQpidConnections} -lt $(( qpidConnLimit - qpidConnHighAlarm )) ]] ; then
echo -e "\tNOTE: Sending Warning ITO to NCF because number of connections is between $(( qpidConnLimit - qpidConnMedAlarm )) and $(( qpidConnLimit - qpidConnHighAlarm ))" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
if [[ -f /opt/OV/bin/OpC/opcmsg ]] ; then
opt/OV/bin/OpC/opcmsg application=QPIDD object=QPIDD msg_text="Number Of Connections To QPID is between 450-485: Please check system health" severity=Major msg_grp=AWIPS
/opt/OV/bin/OpC/opcmsg application=QPIDD object=QPIDD msg_text="Number Of Connections To QPID is between $(( qpidConnLimit - qpidConnMedAlarm )) and $(( qpidConnLimit - qpidConnHighAlarm )) : Please check for deadlock condition" severity=Warning msg_grp=AWIPS
else
echo -e "\tERROR - can not find /opt/OV/bin/OpC/opcmsg on $( hostname )" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
fi
elif [[ ${numQpidConnections} -gt $(( qpidConnLimit - 15 )) ]] ; then
echo -e "\tNOTE: Sending CRITIAL ITO to NCF because number of connections is > 485" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
elif [[ ${numQpidConnections} -ge $(( qpidConnLimit - qpidConnHighAlarm )) && ${numQpidConnections} -lt $(( qpidConnLimit - qpidConnCritAlarm )) ]] ; then
echo -e "\tNOTE: Sending Major ITO to NCF because number of connections is between $(( qpidConnLimit - qpidConnHighAlarm )) and $(( qpidConnLimit - qpidConnCritAlarm ))" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
if [[ -f /opt/OV/bin/OpC/opcmsg ]] ; then
/opt/OV/bin/OpC/opcmsg application=QPIDD object=QPIDD msg_text="Number Of Connections To QPID is between $(( qpidConnLimit - qpidConnMedAlarm )) and $(( qpidConnLimit - qpidConnHighAlarm )) : Please check for deadlock condition" severity=Major msg_grp=AWIPS
else
echo -e "\tERROR - can not find /opt/OV/bin/OpC/opcmsg on $( hostname )" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
fi
elif [[ ${numQpidConnections} -ge $(( qpidConnLimit - qpidConnCritAlarm )) ]] ; then
echo -e "\tNOTE: Sending CRITIAL ITO to NCF because number of connections is >= $(( qpidConnLimit - qpidConnCritAlarm ))" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
if [[ -f /opt/OV/bin/OpC/opcmsg ]] ; then
/opt/OV/bin/OpC/opcmsg application=QPIDD object=QPIDD msg_text="Number Of Connections To QPID is > 485 -- Take IMMEDIATE action to prevent system failure" severity=Critical msg_grp=AWIPS
/opt/OV/bin/OpC/opcmsg application=QPIDD object=QPIDD msg_text="Number Of Connections To QPID is >= $(( qpidConnLimit - qpidConnCritAlarm )) -- Take IMMEDIATE action to prevent system failure" severity=Critical msg_grp=AWIPS
else
echo -e "\tERROR - can not find /opt/OV/bin/OpC/opcmsg on $( hostname )" >> ${logDirectory}/${nowTimeDate}-qpid-stat.out
fi

View file

@ -86,6 +86,7 @@ fi
if [ "${1}" = "-python-qpid" ]; then
buildRPM "awips2"
buildRPM "awips2-python-qpid"
buildRPM "awips2-python"
buildRPM "awips2-python-cherrypy"
buildRPM "awips2-python-dynamicserialize"
@ -97,7 +98,6 @@ if [ "${1}" = "-python-qpid" ]; then
buildRPM "awips2-python-pil"
buildRPM "awips2-python-pmw"
buildRPM "awips2-python-pupynere"
buildRPM "awips2-python-qpid"
buildRPM "awips2-python-scientific"
buildRPM "awips2-python-scipy"
buildRPM "awips2-python-tables"