ldm 6.13.7
This commit is contained in:
parent
1429aa9445
commit
2ee53236ed
6 changed files with 100 additions and 130 deletions
|
@ -1,4 +1,4 @@
|
|||
%define _ldm_version 6.13.6
|
||||
%define _ldm_version 6.13.7
|
||||
%define _ldm_src_tar ldm-%{_ldm_version}.tar.gz
|
||||
# ldm-%{_ldm_version}.tar.gz is tarred up ldm-%{_ldm_version}/src dir after
|
||||
# ISG makes retrans changes
|
||||
|
@ -74,45 +74,24 @@ _ldm_destination_source=${_ldm_destination}/SOURCES
|
|||
_Installer_ldm=%{_baseline_workspace}/rpms/awips2.upc/Installer.ldm
|
||||
_ldm_root_dir=/awips2/ldm
|
||||
|
||||
_ldm_build_bin=%{_build_root}/awips2/ldm/bin
|
||||
_edex_bin=%{_build_root}/awips2/edex/bin
|
||||
/bin/mkdir -p ${_ldm_build_bin}
|
||||
/bin/mkdir -p ${_edex_bin}
|
||||
|
||||
cd ${_Installer_ldm}/src
|
||||
#g++ edexBridge.cpp -I${_ldm_root_dir}/src/pqact \
|
||||
# -I${_ldm_root_dir}/include \
|
||||
# -I${_ldm_root_dir}/src \
|
||||
# -I/awips2/qpid/include \
|
||||
# -L${_ldm_root_dir}/lib \
|
||||
# -L/awips2/qpid/lib \
|
||||
# -l ldm -l xml2 -l qpidclient -l qpidmessaging -l qpidcommon -l qpidtypes -o edexBridge
|
||||
#if [ $? -ne 0 ]; then
|
||||
# echo "FATAL: failed to build edexBridge"
|
||||
# exit 1
|
||||
#fi
|
||||
#/bin/mv edexBridge ${_ldm_build_bin}/edexBridge
|
||||
#if [ $? -ne 0 ]; then
|
||||
# echo "FATAL: failed to move edexBridge to ldm bin directory"
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
# copy the ldm source to the destination directory.
|
||||
/bin/cp ${_Installer_ldm}/src/%{_ldm_src_tar} ${_ldm_destination_source}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
cd %{_baseline_workspace}
|
||||
|
||||
/bin/cp ${_Installer_ldm}/src/edexBridge.cpp ${_ldm_destination_source}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
if [[ $(uname -r |grep el6) ]];then
|
||||
cp ${_Installer_ldm}/edexBridge.el6 ${_edex_bin}/edexBridge
|
||||
elif [[ $(uname -r |grep el7) ]];then
|
||||
cp ${_Installer_ldm}/edexBridge.el7 ${_edex_bin}/edexBridge
|
||||
fi
|
||||
#_edex_bin=%{_build_root}/awips2/edex/bin
|
||||
#/bin/mkdir -p ${_edex_bin}
|
||||
#if [[ $(uname -r |grep el6) ]];then
|
||||
# cp ${_Installer_ldm}/edexBridge.el6 ${_edex_bin}/edexBridge
|
||||
#elif [[ $(uname -r |grep el7) ]];then
|
||||
# cp ${_Installer_ldm}/edexBridge.el7 ${_edex_bin}/edexBridge
|
||||
#fi
|
||||
|
||||
# Create patch tar files
|
||||
cd ${_Installer_ldm}/patch
|
||||
|
@ -166,8 +145,6 @@ fi
|
|||
%post
|
||||
_ldm_dir=/awips2/ldm
|
||||
_ldm_root_dir=${_ldm_dir}/ldm-%{_ldm_version}
|
||||
_myHost=`hostname`
|
||||
_myHost=`echo ${_myHost} | cut -f1 -d'-'`
|
||||
|
||||
# Remove old ldm dir
|
||||
rm -rf ${_ldm_root_dir}
|
||||
|
@ -192,10 +169,9 @@ if [ $? -ne 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
# Fix libtool incompatibility in source tar ball
|
||||
rm -f libtool
|
||||
ln -s /usr/bin/libtool libtool
|
||||
make LDMHOME=/awips2/ldm > make.log 2>&1
|
||||
make install LDMHOME=/awips2/ldm > install.log 2>&1
|
||||
#rm -f libtool
|
||||
#ln -s /usr/bin/libtool libtool
|
||||
make install LDMHOME=/awips2/ldm
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FATAL: make install has failed!"
|
||||
exit 1
|
||||
|
@ -225,26 +201,22 @@ do
|
|||
done
|
||||
/bin/chmod a+x ${_ldm_dir}/bin/*
|
||||
|
||||
#cd ../edexBridge
|
||||
#if [ $? -ne 0 ]; then
|
||||
# exit 1
|
||||
#fi
|
||||
#g++ edexBridge.cpp -I${_ldm_root_dir}/src/pqact \
|
||||
# -I${_ldm_root_dir}/include \
|
||||
# -I${_ldm_root_dir}/src \
|
||||
# -I/awips2/qpid/include \
|
||||
# -L${_ldm_root_dir}/lib \
|
||||
# -L/awips2/qpid/lib \
|
||||
# -l ldm -l xml2 -l qpidclient -l qpidmessaging -l qpidcommon -l qpidtypes -o edexBridge
|
||||
#if [ $? -ne 0 ]; then
|
||||
# echo "FATAL: failed to build edexBridge!"
|
||||
# exit 1
|
||||
#fi
|
||||
#/bin/mv edexBridge ${_ldm_dir}/bin/edexBridge
|
||||
#if [ $? -ne 0 ]; then
|
||||
# echo "FATAL: failed to move edexBridge to ldm bin directory!"
|
||||
# exit 1
|
||||
#fi
|
||||
g++ edexBridge.cpp -I${_ldm_root_dir}/src/pqact \
|
||||
-I${_ldm_root_dir}/include \
|
||||
-I${_ldm_root_dir}/src \
|
||||
-I/awips2/qpid/include \
|
||||
-L${_ldm_root_dir}/lib \
|
||||
-L/awips2/qpid/lib \
|
||||
-l ldm -l xml2 -l qpidclient -l qpidmessaging -l qpidcommon -l qpidtypes -o edexBridge
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FATAL: failed to build edexBridge!"
|
||||
exit 1
|
||||
fi
|
||||
/bin/mv edexBridge ${_ldm_dir}/bin/edexBridge
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FATAL: failed to move edexBridge to ldm bin directory!"
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
|
||||
/sbin/ldconfig > /dev/null 2>&1
|
||||
|
@ -287,6 +259,6 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||
/awips2/ldm/SOURCES/*
|
||||
%attr(755,root,root) /etc/init.d/edex_ldm
|
||||
%attr(600,awips,fxalpha) /var/spool/cron/awips
|
||||
%attr(755,awips,fxalpha) /awips2/edex/bin/edexBridge
|
||||
#%attr(755,awips,fxalpha) /awips2/edex/bin/edexBridge
|
||||
%attr(755,root,root) /etc/ld.so.conf.d/awips2-ldm.conf
|
||||
%attr(755,root,root) /etc/logrotate.d/ldm.log
|
||||
|
|
|
@ -251,10 +251,6 @@ HDS ^(JSM[TLF]..) (KWN[OH]) (..)(..)(..)
|
|||
HDS ^(IUS(Z[0-9]|Y4)[0-9]) ([A-Z]{4}) (..)(..)(..)
|
||||
FILE -overwrite -close -edex
|
||||
/awips2/data_store/bufrua/\1_\3_\4\5\6_(seq).bufr
|
||||
# bufrNCWF
|
||||
HDS ^(JSAT98) (KKCI) (..)(..)(..)
|
||||
FILE -overwrite -close -edex
|
||||
/awips2/data_store/bufrncwf/\1_\2_\3\4\5_(seq).bufr
|
||||
# bufrSIGWX
|
||||
HDS ^(JU[BCFJMNOTVW]E(00|9[679])) KKCI (..)(..)(..)
|
||||
FILE -overwrite -close -edex
|
||||
|
@ -791,12 +787,6 @@ NGRID ^([LM][ABCDFGH]U...) (KWBN) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#
|
|||
FILE -edex -close
|
||||
/awips2/data_store/grid/HPCGuide/GRID\8/HPCGuide_GRID\8_\(10)Z_\(11)_\(12)-\1_\2_\3\4\5-(seq).grib2
|
||||
#
|
||||
# National Convective Weather Detection (NCWD)
|
||||
#
|
||||
ANY ^ZDIA98 (....) ......[^!]*!grib.*/[^/]*/[^/]*/#[^/]*/([0-9]{8})([0-9]{4})/(F[0-9]{3})
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/NCWD/NCWD_\2_\3_\4_\1-(seq).grib
|
||||
#
|
||||
# National Operational Hydrologic Remote Sensing Center Snow Analysis (NOHRSC-SNOW)
|
||||
#
|
||||
HDS ^[YZ][ES]QA88 KMSR ......[^!]*!grib.*/[^/]*/[^/]*/#[^/]*/([0-9]{8})([0-9]{4})/(F[0-9]{3})/([^/]*)
|
||||
|
@ -890,9 +880,9 @@ NGRID ^(Y.UZ9[0-9]) (KWB.) (..)(..)(..)
|
|||
#
|
||||
# ECMF-Global, ECMF1..ECMF12
|
||||
#
|
||||
#HDS ^H..... ECM. ......[^!]*!grib.*/[^/]*/[^/]*/#([^/]*)/([0-9]{8})([0-9]{4})/(F[0-9]{3})/([^/]*)
|
||||
# FILE -edex -close
|
||||
# /awips2/data_store/grid/ECMWF/ECMWF-\1_\2_\3_\4_\5-(seq).grib
|
||||
HDS ^H..... ECM. ......[^!]*!grib.*/[^/]*/[^/]*/#([^/]*)/([0-9]{8})([0-9]{4})/(F[0-9]{3})/([^/]*)
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/ECMWF/ECMWF-\1_\2_\3_\4_\5-(seq).grib
|
||||
#
|
||||
# ---------------------------------------------------
|
||||
# - National Precipitation Verification Unit (NPVU) -
|
||||
|
@ -906,22 +896,22 @@ NGRID ^(Y.UZ9[0-9]) (KWB.) (..)(..)(..)
|
|||
#
|
||||
# Climate Forecast System Downscaled Numerical Guidance (CFS-DNG)
|
||||
#
|
||||
#HDS ^Z[ET]CZ98 KWBF ......[^!]*!grib2/ncep/CFS/#[^/]*/(............)(....)/([^/]*)
|
||||
# FILE -edex -close
|
||||
# /awips2/data_store/grid/CFS/CFS-\1\2_\3-(seq).grib2
|
||||
HDS ^Z[ET]CZ98 KWBF ......[^!]*!grib2/ncep/CFS/#[^/]*/(............)(....)/([^/]*)
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/CFS/CFS-\1\2_\3-(seq).grib2
|
||||
#
|
||||
# Automated Satellite Precipitation Estimates from NESDIS (hourly) (AUTOSPE)
|
||||
# also called the Global Hydro-Estimator (GHE)
|
||||
#
|
||||
HDS ^ZETA9. KNES ......[^!]*!grib.*/[^/]*/[^/]*/#[^/]*/([0-9]{8})([0-9]{4})/([^/]*)/([^/]*)
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/AUTOSPE/AUTOSPE-\1\2_\3_\4-(seq).grib2
|
||||
HDS ^(ZETA9.) KNES (......)
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/AUTOSPE/AUTOSPE_\1_\2.grib2
|
||||
#
|
||||
# River Forecast Center (RFC) Quantitative Precipitation Estimation (QPE)
|
||||
#
|
||||
HDS ^ZETA98 (KTUA|PACR|KSTR|KRSA|KORN|KRHA|KKRF|KMSR|KTAR|KPTR|KTIR|KALR|KFWR) ......[^!]*!(grib|grib2)/[^/]*/([^/]*)/#255/([0-9]{8})([0-9]{4})/(F[0-9]{3})/([^/]*)
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/QPE-RFC/QPE-RFC-\1_\3_\4_\5_\6_\7-(seq).grib
|
||||
#HDS ^ZETA98 (KTUA|PACR|KSTR|KRSA|KORN|KRHA|KKRF|KMSR|KTAR|KPTR|KTIR|KALR|KFWR) ......[^!]*!(grib|grib2)/[^/]*/([^/]*)/#255/([0-9]{8})([0-9]{4})/(F[0-9]{3})/([^/]*)
|
||||
# FILE -edex -close
|
||||
# /awips2/data_store/grid/QPE-RFC/QPE-RFC-\1_\3_\4_\5_\6_\7-(seq).grib
|
||||
#
|
||||
# ======================================
|
||||
# = Ocean Models available on the IDD =
|
||||
|
@ -929,9 +919,9 @@ HDS ^ZETA98 (KTUA|PACR|KSTR|KRSA|KORN|KRHA|KKRF|KMSR|KTAR|KPTR|KTIR|KALR|KFWR) .
|
|||
#
|
||||
# WAVE 233 Grid - Global NOAA WAVEWATCH III (WaveWatch)
|
||||
# OPJA88 KWBJ /mNOW !grib/ncep/NOW/ #233/ 201603110000/ F 000/ DIRSW/sfc/
|
||||
#HDS ^O.J.88 KWBJ.*!grib/ncep/[^/]*/#[^/]*/(............)/F(...)/(.*)/(.*)/
|
||||
# FILE -edex -close
|
||||
# /awips2/data_store/grid/WAVE-HDS-WaveWatch/WaveWatch_\1_F\2_\3_\4_%H%M%S.grib
|
||||
HDS ^O.J.88 KWBJ.*!grib/ncep/[^/]*/#[^/]*/(............)/F(...)/(.*)/(.*)/
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/WAVE-HDS-WaveWatch/WaveWatch_\1_F\2_\3_\4_%H%M%S.grib
|
||||
#
|
||||
# WAVE 238 Grid - Regional Western North Atlantic (WAVE-WNA)
|
||||
#
|
||||
|
@ -1023,9 +1013,9 @@ HDS ^OENA88 KWBM.*ncep/ICE_120/#219/(............)/F(...)/([^/]*)/
|
|||
#
|
||||
# Real-Time Ocean Forecast System (RTOFS) for CONUS
|
||||
#
|
||||
#NGRID ^E[HSTUV][CK][B-T]01 KWBW ......[^!]*!grib.*/[^/]*/[^/]*/#[^/]*/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*)
|
||||
# FILE -edex -close
|
||||
# /awips2/data_store/grid/RTOFS/RTOFS_\1_\2_\3_\4-(seq).grib2
|
||||
NGRID ^E[HSTUV][CK][B-T]01 KWBW ......[^!]*!grib.*/[^/]*/[^/]*/#[^/]*/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*)
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/RTOFS/RTOFS_\1_\2_\3_\4-(seq).grib2
|
||||
#
|
||||
# ESTOFS - US
|
||||
#
|
||||
|
@ -1071,9 +1061,9 @@ NGRID ^([LM]DG.{1,3}) (KNHC) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]
|
|||
#
|
||||
# GLERL
|
||||
#
|
||||
#HDS ^O.N.88 KWNB.*!grib/161/([^/]*)/#([^/]*)/(............)/F(...)/.*
|
||||
# FILE -edex -close
|
||||
# /awips2/data_store/grid/GLERL/GLERL_\1_F\2_%H%M%S.grib
|
||||
HDS ^O.N.88 KWNB.*!grib/161/([^/]*)/#([^/]*)/(............)/F(...)/.*
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/GLERL/GLERL_\1_F\2_%H%M%S.grib
|
||||
#
|
||||
# Flash Flood Guidance (FFG) grids - 1HR=HPBL, 3HR=5WAVH, 6HR=CNWAT (FFG-PTR...)
|
||||
#
|
||||
|
@ -1095,18 +1085,18 @@ NGRID ^OUTA98 KWNB (......)[^!]*!grib2
|
|||
#
|
||||
# Regional River Forecast Center (RFC) Quantitative Precipitation Forecast (QPF) (RFCqpf)
|
||||
#
|
||||
HDS ^YEI.[89]8 (KWNH|KALR|KFWR|KKRF|KMSR|KORN|KPTR|KRHA|KRSA|KSTR|KTAR|KTIR|KTUA) .......*/#([^/]*)/([0-9]{8})([0-9]{4})/(F[0-9]{3})/[^/]*/([^/]*)
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/Regional_RFC_QPF/GRID\2/\3_\4_\5_\6-(seq).grib
|
||||
#HDS ^YEI.[89]8 (KWNH|KALR|KFWR|KKRF|KMSR|KORN|KPTR|KRHA|KRSA|KSTR|KTAR|KTIR|KTUA) .......*/#([^/]*)/([0-9]{8})([0-9]{4})/(F[0-9]{3})/[^/]*/([^/]*)
|
||||
# FILE -edex -close
|
||||
# /awips2/data_store/grid/Regional_RFC_QPF/GRID\2/\3_\4_\5_\6-(seq).grib
|
||||
#
|
||||
# GRID218 = HPCqpf
|
||||
#
|
||||
HDS ^(ZEX.98) KWNH (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#218/([0-9]{8})([0-9]{4})/(F[0-9]{3})/([^/]*)
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/HPCqpf/HPCqpf_\9Z_\(10)_\(11)-\1_KWNH_\2\3\4-(seq).grib
|
||||
#HDS ^(ZEX.98) KWNH (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#218/([0-9]{8})([0-9]{4})/(F[0-9]{3})/([^/]*)
|
||||
# FILE -edex -close
|
||||
# /awips2/data_store/grid/HPCqpf/HPCqpf_\9Z_\(10)_\(11)-\1_KWNH_\2\3\4-(seq).grib
|
||||
#
|
||||
# National Blend of Models
|
||||
#
|
||||
#NGRID ^(Y.A...) (KWE[AB]) (......)
|
||||
# FILE -edex -close
|
||||
# /awips2/data_store/grid/NationalBlend/NationalBlend_\1_\2_\3.grib2
|
||||
NGRID ^(Y.A...) (KWE[AB]) (......)
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/NationalBlend/NationalBlend_\1_\2_\3.grib2
|
||||
|
|
|
@ -385,12 +385,6 @@ NGRID ^([LM][ABCDFGH]U...) (KWBN) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#
|
|||
FILE -edex -close
|
||||
/awips2/data_store/grid/HPCGuide/GRID\8/HPCGuide_GRID\8_\(10)Z_\(11)_\(12)-\1_\2_\3\4\5-(seq).grib2
|
||||
#
|
||||
# National Convective Weather Detection (NCWD)
|
||||
#
|
||||
ANY ^ZDIA98 (....) ......[^!]*!grib.*/[^/]*/[^/]*/#[^/]*/([0-9]{8})([0-9]{4})/(F[0-9]{3})
|
||||
FILE -edex -close
|
||||
/awips2/data_store/grid/NCWD/NCWD_\2_\3_\4_\1-(seq).grib
|
||||
#
|
||||
# National Operational Hydrologic Remote Sensing Center Snow Analysis (NOHRSC-SNOW)
|
||||
#
|
||||
HDS ^[YZ][ES]QA88 KMSR ......[^!]*!grib.*/[^/]*/[^/]*/#[^/]*/([0-9]{8})([0-9]{4})/(F[0-9]{3})/([^/]*)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <sstream>
|
||||
#include <memory>
|
||||
#include <filel.h>
|
||||
#include <ulog.h>
|
||||
#include <log/log.h>
|
||||
#include <getopt.h>
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -97,10 +97,10 @@ public:
|
|||
string fileHeader;
|
||||
|
||||
try {
|
||||
// limit number of messages sent at one time so we don't miss messages from shared memory if
|
||||
// a message build up occurred due to qpid being down (usual rate is under 100 a second)
|
||||
// limit number of messages sent at one time so we don't miss messages from shared memory if
|
||||
// a message build up occurred due to qpid being down (usual rate is under 100 a second)
|
||||
while ((!this->filenameList.empty()) && (messagesProcessed < this->maxMessagesPerSend)) {
|
||||
Message message;
|
||||
qpid::messaging::Message message;
|
||||
|
||||
fileLocation = this->filenameList.front();
|
||||
fileHeader = this->headerList.front();
|
||||
|
@ -121,7 +121,8 @@ public:
|
|||
}
|
||||
} catch (const std::exception& error) {
|
||||
// Error occurred during communication. Clean up the connection and return the number of messages processed.
|
||||
uerror(error.what());
|
||||
log_add(error.what());
|
||||
log_flush_error();
|
||||
cleanup();
|
||||
|
||||
}
|
||||
|
@ -132,7 +133,8 @@ private:
|
|||
|
||||
void cleanup()
|
||||
{
|
||||
unotice ("Cleaning up");
|
||||
log_add ("Cleaning up");
|
||||
log_flush_info();
|
||||
|
||||
// Destroy resources.
|
||||
if (this->sender != 0)
|
||||
|
@ -144,7 +146,8 @@ private:
|
|||
}
|
||||
catch (const std::exception& error)
|
||||
{
|
||||
uwarn(error.what());
|
||||
log_add(error.what());
|
||||
log_flush_error();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +160,8 @@ private:
|
|||
}
|
||||
catch (const std::exception& error)
|
||||
{
|
||||
uwarn(error.what());
|
||||
log_add(error.what());
|
||||
log_flush_error();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,7 +174,8 @@ private:
|
|||
}
|
||||
catch (const std::exception& error)
|
||||
{
|
||||
uwarn(error.what());
|
||||
log_add(error.what());
|
||||
log_flush_error();
|
||||
}
|
||||
}
|
||||
this->isConnected = false;
|
||||
|
@ -217,7 +222,8 @@ private:
|
|||
}
|
||||
catch (const std::exception& error)
|
||||
{
|
||||
uerror(error.what());
|
||||
log_add(error.what());
|
||||
log_flush_error();
|
||||
cleanup();
|
||||
}
|
||||
return this->isConnected;
|
||||
|
@ -230,8 +236,9 @@ static volatile int done = 0;
|
|||
static edex_message * messageCursor;
|
||||
|
||||
static void cleanup(void) {
|
||||
unotice("Exiting");
|
||||
(void) closeulog();
|
||||
log_add("Exiting");
|
||||
log_flush_info();
|
||||
log_fini();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -259,7 +266,7 @@ static void signal_handler(int sig) {
|
|||
/* TODO? stats */
|
||||
return;
|
||||
case SIGUSR2:
|
||||
rollulogpri();
|
||||
//rollulogpri();
|
||||
return;
|
||||
case SIGALRM:
|
||||
return;
|
||||
|
@ -309,7 +316,7 @@ static void set_sigactions(void) {
|
|||
int main(int argc, char* argv[]) {
|
||||
|
||||
char * logfname = 0;
|
||||
int loggingToStdErr = 0;
|
||||
log_init(argv[0]);
|
||||
std::string brokerURI = "127.0.0.1";
|
||||
int port = 5672;
|
||||
std::string username = "guest";
|
||||
|
@ -342,19 +349,19 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
}
|
||||
}
|
||||
(void) setulogmask(logmask);
|
||||
}
|
||||
|
||||
if (atexit(cleanup) != 0) {
|
||||
serror("atexit");
|
||||
unotice("Exiting");
|
||||
//serror("atexit");
|
||||
log_add("Exiting");
|
||||
log_flush_info();
|
||||
log_fini();
|
||||
exit(1);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
loggingToStdErr = STDERR_FILENO == openulog(ubasename(argv[0]), (LOG_CONS
|
||||
| LOG_PID), LOG_LDM, logfname);
|
||||
unotice("Starting Up");
|
||||
log_add("Starting Up");
|
||||
log_flush_info();
|
||||
|
||||
set_sigactions();
|
||||
|
||||
|
@ -376,8 +383,10 @@ int main(int argc, char* argv[]) {
|
|||
int semCounter = 0;
|
||||
while ((semid = semget(semkey, 2, 0666)) == -1) {
|
||||
if (semCounter == 5) {
|
||||
uerror(
|
||||
log_add(
|
||||
"Could not attach to the semaphore created by pqact. Exiting.");
|
||||
log_flush_error();
|
||||
log_fini();
|
||||
exit(0);
|
||||
}
|
||||
semCounter++;
|
||||
|
@ -386,8 +395,10 @@ int main(int argc, char* argv[]) {
|
|||
int sizeOfQueue = semctl(semid, 0, GETVAL);
|
||||
shmid = shmget(key, sizeof(edex_message) * sizeOfQueue, 0666);
|
||||
if (shmid == -1) {
|
||||
uerror(
|
||||
log_add(
|
||||
"Could not attach to the shared memory created by pqact. Exiting.");
|
||||
log_flush_error();
|
||||
log_fini();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -414,7 +425,7 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
// Need to copy in the end of the queue before moving to front
|
||||
if (lastQueueSize > queueSize) {
|
||||
unotice(
|
||||
log_add(
|
||||
"Coming over the top with lastQueueSize of %d on a size of %d",
|
||||
lastQueueSize, sizeOfQueue);
|
||||
endQueueDiff = sizeOfQueue - lastQueueSize;
|
||||
|
@ -434,21 +445,24 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
int messagesSent = 0;
|
||||
if ((messagesSent = producer.send()) == -1) {
|
||||
uerror(
|
||||
log_add(
|
||||
"Could not connect to the remote EDEX instance. %d messages waiting to be sent. Will try again in 1 second.",
|
||||
producer.getMessageCount());
|
||||
log_flush_error();
|
||||
sleep(1);
|
||||
continue;
|
||||
}
|
||||
if ((messagesSent != maxMessagesPerSend) && (messagesSent != (queue_diff + endQueueDiff))) {
|
||||
uerror(
|
||||
log_add(
|
||||
"Only %d messages were sent out of an expected %d. Will store those not sent and try again.",
|
||||
messagesSent, queue_diff);
|
||||
log_flush_error();
|
||||
|
||||
}
|
||||
unotice(
|
||||
log_add(
|
||||
"Sent %d messages (%d at the end of the queue, %d normally).",
|
||||
messagesSent, endQueueDiff, queue_diff);
|
||||
log_flush_info();
|
||||
}
|
||||
sleep(1);
|
||||
}
|
||||
|
|
Binary file not shown.
BIN
rpms/awips2.upc/Installer.ldm/src/ldm-6.13.7.tar.gz
Normal file
BIN
rpms/awips2.upc/Installer.ldm/src/ldm-6.13.7.tar.gz
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue