All
Added "STARTING" message to the histmem command status. Can now make multiple script context positional motors Added table and table entry IDs for posit motor lookup tables. Fixed the runsics script so that the stop command sends an EndServer interrupt via the UDP port instead of killing SICS, this ensures that status is saved. Platypus Added chopper speed, phase and phase offsets for all choppers on hdb tree and in datafile Quokka Replace the sample/select command with the changer_position script context positional motor interface. Fixed upper limit on apx motor Added full sample changer and auto aperture positional motors r2727 | ffr | 2008-10-31 15:37:32 +1100 (Fri, 31 Oct 2008) | 14 lines
This commit is contained in:
committed by
Douglas Clowes
parent
b9e1b19252
commit
04e2e75d80
@@ -1,17 +1,24 @@
|
||||
#!/bin/sh
|
||||
ulimit -c unlimited
|
||||
# We should really have an init script calling this or something like it.
|
||||
INSTRUMENT=${HOSTNAME#ics1-}
|
||||
|
||||
intserverport=60002
|
||||
serverport=60003
|
||||
|
||||
intvalport=60012
|
||||
valport=60013
|
||||
|
||||
# Start SICS
|
||||
startsics() {
|
||||
if netstat -ltp 2> /dev/null|grep -q "server-${INSTRUMENT}.*SICServer"; then
|
||||
if netstat -nltp 2> /dev/null|grep -q "${serverport}.*SICServer"; then
|
||||
echo SICS is already running
|
||||
return 1
|
||||
fi
|
||||
echo Starting SICS
|
||||
cd /usr/local/sics/server
|
||||
nohup $PWD/SICServer ${INSTRUMENT}_configuration.tcl
|
||||
if netstat -ltp 2> /dev/null|grep -q "server-${INSTRUMENT}.*SICServer"; then
|
||||
if netstat -nltp 2> /dev/null|grep -q "${serverport}.*SICServer"; then
|
||||
echo SUCCESS
|
||||
return 1
|
||||
else
|
||||
@@ -22,7 +29,7 @@ startsics() {
|
||||
|
||||
# Start script validator
|
||||
startscriptvalidator() {
|
||||
if netstat -ltp 2> /dev/null|grep -q "server-val-${INSTRUMENT}.*SICServer"; then
|
||||
if netstat -nltp 2> /dev/null|grep -q "${valport}.*SICServer"; then
|
||||
echo SICS script validator is already running
|
||||
return 1
|
||||
fi
|
||||
@@ -30,7 +37,7 @@ startscriptvalidator() {
|
||||
cd /usr/local/sics/server/
|
||||
SICS_SIMULATION=script_validator nohup $PWD/SICServer ${INSTRUMENT}_configuration.tcl
|
||||
|
||||
if netstat -ltp 2> /dev/null|grep -q "server-val-${INSTRUMENT}.*SICServer"; then
|
||||
if netstat -nltp 2> /dev/null|grep -q "${valport}.*SICServer"; then
|
||||
echo SUCCESS
|
||||
return 1
|
||||
else
|
||||
@@ -39,6 +46,28 @@ startscriptvalidator() {
|
||||
fi
|
||||
}
|
||||
|
||||
stopsics() {
|
||||
if netstat -nltp 2> /dev/null|grep -q "${serverport}.*SICServer"; then
|
||||
echo "SICSINT 6" |socat STDIN UDP4:localhost:${intserverport},crlf
|
||||
fi
|
||||
if netstat -nltp 2> /dev/null|grep -q "${serverport}.*SICServer"; then
|
||||
echo FAILED to stop SICServer
|
||||
else
|
||||
echo SICServer stopped
|
||||
fi
|
||||
}
|
||||
|
||||
stopscriptvalidator() {
|
||||
if netstat -nltp 2> /dev/null|grep -q "${valport}.*SICServer"; then
|
||||
echo "SICSINT 6" |socat STDIN UDP4:localhost:${intvalport},crlf
|
||||
fi
|
||||
if netstat -nltp 2> /dev/null|grep -q "${valport}.*SICServer"; then
|
||||
echo FAILED to stop SICS script validator
|
||||
else
|
||||
echo SICS script validator stopped
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
progname=`basename $0`
|
||||
echo Usage: $progname start
|
||||
@@ -63,29 +92,24 @@ then
|
||||
echo
|
||||
elif [ $1 = "stop" ]
|
||||
then
|
||||
if killall SICServer; then
|
||||
echo Terminating all SICS servers
|
||||
if netstat -nltp 2> /dev/null|grep -q "${serverport}.*SICServer"; then
|
||||
stopsics
|
||||
else
|
||||
echo No SICS servers are running
|
||||
echo SICServer NOT running
|
||||
fi
|
||||
if netstat -ltp 2> /dev/null|grep -q "server-${INSTRUMENT}.*SICServer"; then
|
||||
echo FAILED to stop SICServer
|
||||
if netstat -nltp 2> /dev/null|grep -q "${valport}.*SICServer"; then
|
||||
stopscriptvalidator
|
||||
else
|
||||
echo SICServer stopped
|
||||
fi
|
||||
if netstat -ltp 2> /dev/null|grep -q "server-val-${INSTRUMENT}.*SICServer"; then
|
||||
echo FAILED to stop SICS script validator
|
||||
else
|
||||
echo SICS script validator stopped
|
||||
echo SICS script validator NOT running
|
||||
fi
|
||||
elif [ $1 = "status" ]
|
||||
then
|
||||
if netstat -ltp 2> /dev/null|grep -q "server-${INSTRUMENT}.*SICServer"; then
|
||||
if netstat -nltp 2> /dev/null|grep -q "${serverport}.*SICServer"; then
|
||||
echo SICServer running
|
||||
else
|
||||
echo SICServer NOT running
|
||||
fi
|
||||
if netstat -ltp 2> /dev/null|grep -q "server-val-${INSTRUMENT}.*SICServer"; then
|
||||
if netstat -nltp 2> /dev/null|grep -q "${valport}.*SICServer"; then
|
||||
echo SICS script validator running
|
||||
else
|
||||
echo SICS script validator NOT running
|
||||
|
||||
Reference in New Issue
Block a user