Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4186 - trunk/packaging/deb/ps-mdm-flowsa-ma

Subject: perfsonar development work

List archive

perfsonar: r4186 - trunk/packaging/deb/ps-mdm-flowsa-ma


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4186 - trunk/packaging/deb/ps-mdm-flowsa-ma
  • Date: Mon, 14 Jul 2008 11:31:59 -0400

Author: gijs
Date: 2008-07-14 11:31:59 -0400 (Mon, 14 Jul 2008)
New Revision: 4186

Modified:
trunk/packaging/deb/ps-mdm-flowsa-ma/init
Log:


Modified: trunk/packaging/deb/ps-mdm-flowsa-ma/init
===================================================================
--- trunk/packaging/deb/ps-mdm-flowsa-ma/init 2008-07-14 14:45:00 UTC (rev
4185)
+++ trunk/packaging/deb/ps-mdm-flowsa-ma/init 2008-07-14 15:31:59 UTC (rev
4186)
@@ -60,13 +60,21 @@
GROUP=`grep ^service\.ma\.flowsa\.nfcapd\.group $CONF | cut -f 2 -d =`

# get number of configured exporters && check if > 0
-#EXPNUM=`grep ^service\.ma\.flowsa\.exporter.*\.hostname $CONF | wc -l`
-EXPNUM=`grep ^service\.ma\.flowsa\.exporters $CONF | cut -f 2 -d =`
+EXPNUM=0
+for NUM in `seq 256`; do
+ ENABLED=`grep ^service\.common\.flow\.exporter\.$NUM\.enabled $CONF |
cut -f 2 -d =`
+ if [ -z $ENABLED ] || [ $ENABLED != true ]; then
+ break;
+ fi
+ EXPNUM=$NUM
+done
+
if [ $EXPNUM == 0 ]; then
- log_failure_msg "no exporters configured in $CONF"
- exit 1;
+ log_failure_msg "no exporters configured in $CONF"
+ exit 1;
fi

+
# get nfcapd storage location
STORAGE=`grep ^service\.ma\.flowsa\.nfdump\.source $CONF | cut -f 2 -d =`
if [ ! -d $STORAGE ] || [ -z $STORAGE ]; then
@@ -78,16 +86,16 @@
start) log_daemon_msg "Starting PERFsonar flow-sa-ma collector(s)"
for NUM in `seq $EXPNUM`; do
# read hostname from properties file, and check if it exists
- HOST=`grep ^service\.ma\.flowsa\.exporter$NUM\.hostname $CONF
| cut -f 2 -d =`
+ HOST=`grep ^service\.common\.flow\.exporter\.$NUM\.address
$CONF | cut -f 2 -d =`
if [ -z $HOST ]; then
- log_failure_msg
"service.ma.flowsa.exporter$NUM.hostname not defined in $CONF"
+ log_failure_msg
"service.common.flow.exporter.$NUM.address not defined in $CONF"
exit 1
fi

# read port from properties file, and check if it exists
- PORT=`grep ^service\.ma\.flowsa\.exporter$NUM\.port $CONF |
cut -f 2 -d =`
+ PORT=`grep ^service\.common\.flow\.exporter\.$NUM\.port $CONF
| cut -f 2 -d =`
if [ -z $PORT ]; then
- log_failure_msg "service.ma.flowsa.exporter$NUM.PORT
not defined in $CONF"
+ log_failure_msg
"service.common.flow.exporter.$NUM.port not defined in $CONF"
exit 1
fi




  • perfsonar: r4186 - trunk/packaging/deb/ps-mdm-flowsa-ma, svnlog, 07/14/2008

Archive powered by MHonArc 2.6.16.

Top of Page