Added the small support driver for the picoscope

Added a deploysics script
The Tcl data and time functions were moved to the SICS kernel
This commit is contained in:
2015-07-07 12:33:02 +02:00
parent c3744cea5f
commit 0294b7ad95
15 changed files with 2802 additions and 2781 deletions

45
utils/deploysics Executable file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/tclsh
#----------------------------------------------------------
# A script for deploying SICS servers easily
#
# Mark Koennecke, April 2015
#----------------------------------------------------------
set instlist [list amor boa dmc eiger focus hrpt mars \
morpheus narziss orion poldi rita2 sans sans2 tasp trics]
proc execCommand {command} {
puts stdout "Doing $command"
set status [catch {eval exec $command} msg]
if {$status != 0} {
puts stdout "ERROR: $msg "
}
}
#-----------------------------------------------------------
proc replaceServer {inst} {
execCommand "ssh ${inst}@${inst} monit stop sicsserver"
execCommand "ssh ${inst}@${inst} monit stop simserver"
execCommand "scp ./SICServer ${inst}@${inst}:${inst}_sics"
execCommand "ssh ${inst}@${inst} updatesicscommon"
execCommand "ssh ${inst}@${inst} monit start sicsserver"
execCommand "ssh ${inst}@${inst} monit start simserver"
}
if {[llength $argv] < 1} {
puts stdout "usage:\n\tdeploysics instname| all"
exit 1
}
set inst [lindex $argv]
if {[string compare $inst all] == 0} {
foreach inst $instlist {
replaceServer $inst
}
} else {
replaceServer $inst
}
puts stdout "Done"