diff --git a/MAC/APL/APLCommon/src/swlevel b/MAC/APL/APLCommon/src/swlevel index 06b9b701dcb3633f940fbe0fd98dc2bf909eb0f3..fc5e2f9a6a0354aeef1dca7c3793c93a86b2f9e7 100755 --- a/MAC/APL/APLCommon/src/swlevel +++ b/MAC/APL/APLCommon/src/swlevel @@ -26,8 +26,8 @@ # VERSION="v2.1 20100517" # loading image 1 before starting RSPdriver BINDIR=/opt/lofar/bin -LOGDIR=${BINDIR}/../log -ETCDIR=${BINDIR}/../etc +LOGDIR=/opt/lofar/log +ETCDIR=/opt/lofar/etc LEVELTABLE=${ETCDIR}/swlevel.conf # @@ -124,24 +124,23 @@ start_prog() # tenance etc. if [ "$user" = "lofarsys" ]; then rm -f $LOGDIR/$prog.log*.? 1>/dev/null 2>&1 - $BINDIR/$prog 1>/dev/null 2>&1 & - usleep 250000 + $BINDIR/$prog 1>>$LOGDIR//$prog.stdout 2>&1 & fi - else + else if [ -n "$asroot" ]; then sudo rm -f $LOGDIR/$prog.log.? 1>/dev/null 2>&1 if [ "$prog" = "RSPDriver" ]; then selectImage - sudo -b $BINDIR/$prog 1>/dev/null 2>&1 + sudo -b $BINDIR/$prog 1>>$LOGDIR/$prog.stdout 2>&1 else - sudo -b $BINDIR/$prog 1>/dev/null 2>&1 + sudo -b $BINDIR/$prog 1>>$LOGDIR/$prog.stdout 2>&1 fi else rm -f $LOGDIR/$prog.log*.? 1>/dev/null 2>&1 - $BINDIR/$prog 1>/dev/null 2>&1 & + $BINDIR/$prog 1>>$LOGDIR/$prog.stdout 2>&1 & fi - usleep 250000 fi + usleep 250000 ps -ef | grep -v grep | egrep '[0-9][0-9] [a-zA-Z0-9/_.]*/'${prog} fi } @@ -199,7 +198,7 @@ stop_prog() # when normal kill did not work, kill is with -9 for pid in `/sbin/pidof ${prog}` do - sleep 2 + #sleep 2 echo "Hard killing ${prog}(${pid})" $asroot kill -9 $pid 1>/dev/null 2>&1 done @@ -245,19 +244,9 @@ status_prog() fi echo ${levelnr}:${prog}:${pid[*]} | awk -F: '{ printf "%s : %-25s %s\n", $1, $2, $3 }' # Some Checks - # AMCServer needs two instances - if [ "$prog" == "AMCServer" -a $level -ge 3 ]; then - if [ ${#pid[@]} -lt 2 ]; then - missing="$missing ${prog}[$levelnr]" - fi - if [ ${#pid[@]} -gt 2 ]; then - toomany="$toomany ${prog}[$levelnr]" - fi - else - # Other controllers must have one instance, only - if [ ${#pid[@]} -ge 2 ]; then - toomany="$toomany ${prog}[$levelnr]" - fi + # Controllers must have one instance, only + if [ ${#pid[@]} -ge 2 ]; then + toomany="$toomany ${prog}[$levelnr]" fi # Check for missing controllers @@ -492,7 +481,5 @@ status_prog echo $level > /tmp/level.admin chmod ug+rw /tmp/level.admin date=`date +%Y-%m-%d\ %H:%M:%S` -if [ -d /log -a -w /log ]; then - echo [${date}]:$0 $* >> /log/swlevel.log -fi +echo [${date}]:$0 $* >> /log/swlevel.log exit $level diff --git a/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS106-AntennaArrays.conf b/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS106-AntennaArrays.conf index b850b790c0e5b526cc8f141788819b45e1a7f655..029d4da39c1f76744c3f0ac6a50d47e926f2f013 100644 --- a/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS106-AntennaArrays.conf +++ b/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS106-AntennaArrays.conf @@ -364,7 +364,8 @@ HBA -12.699 -13.048 -0.008 -12.699 -13.048 -0.008 -8.538 -16.082 -0.001 -8.538 -16.082 -0.001 -4.375 -19.116 0.006 -4.375 -19.116 0.006 -]LBA +] +LBA 3 [ 6.985082976 52.874052410 51.632 ] 96 x 2 x 3 [ 0.0000 0.0000 0.000 0.0000 0.0000 0.000 diff --git a/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS307-AntennaArrays.conf b/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS307-AntennaArrays.conf index 02e31d62670f4c9d751c2361ac65ffeb16802f02..8b370dda8c10f68e943a2328fbc39eb1d966c196 100644 --- a/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS307-AntennaArrays.conf +++ b/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS307-AntennaArrays.conf @@ -364,7 +364,8 @@ HBA -5.620 -17.319 0.043 -5.620 -17.319 0.043 -0.546 -18.200 0.035 -0.546 -18.200 0.035 4.528 -19.081 0.027 4.528 -19.081 0.027 -]LBA +] +LBA 3 [ 6.680948207 52.803221976 58.381 ] 96 x 2 x 3 [ 0.000 0.0000 0.0000 0.000 0.0000 0.0000 diff --git a/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS503-AntennaArrays.conf b/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS503-AntennaArrays.conf index 69b3ccfb5516f3b86a9d4d1cdc7a19727d8f2119..9d7c4d0a7fe71219ec12e6a2499a9ec1d0986537 100644 --- a/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS503-AntennaArrays.conf +++ b/MAC/Deployment/data/StaticMetaData/AntennaArrays/RS503-AntennaArrays.conf @@ -364,7 +364,8 @@ HBA -18.165 -1.234 0.002 -18.165 -1.234 0.002 -17.094 -6.270 -0.001 -17.094 -6.270 -0.001 -16.022 -11.309 -0.004 -16.022 -11.309 -0.004 -]LBA +] +LBA 3 [ 6.850858101 52.945043059 47.184 ] 96 x 2 x 3 [ 0.000 0.0000 0.000 0.000 0.0000 0.000