commit 2651a8394baa98ee291fafcd2b6cdbd79e2ca788 Author: zimoch Date: Tue Dec 22 11:03:10 2009 +0000 situation in prod at 22.12.2009 diff --git a/R3.14.8 b/R3.14.8 new file mode 100644 index 0000000..fd581bf --- /dev/null +++ b/R3.14.8 @@ -0,0 +1,73 @@ +# All T2-code is compiled with -mlongcall. Thus enable extended memory. +memAddToPool (sysMemTop(),sysPhysMemTop()-sysMemTop()) +EXTENDED_MEMORY=0 + +cd LIB +#required for ifenvsetnew: +ld < utilitiesLib.munch +# disable floating point exceptions +slsFppInit + +# setup mount points +ifenvsetnew (ifName(),"SLSFS01","129.129.145.52","172.19.11.101","172.20.10.10") +hostAdd ("slsfs01",getenv("SLSFS01")) +nfsMount (&sysBootHost, "/ioc", "/ioc") +nfsMount (&sysBootHost, "/home/ioc", "/home/ioc") +nfsMount ("slsfs01","/export/csa/releases/work","/work") +nfsMount ("slsfs01","/export/csa/releases/prod","/prod") +nfsMount ("slsfs01","/export/csa/releases/devl","/devl") +nfsMount ("slsfs01","/export/exchange","/exchange") +# cd to now mounted direcotry +cd LIB + +# load EPICS system core +ld < iocCoreLibrary.munch +# load EPICS tools like "require" +ld < miscLib.munch +misc_registerRecordDeviceDriver + +# next line allows to continue even if mounting of /ioc failed +cd bootInfo("%H:") + +cd HOME + +# setup logging +ifenvsetnew(ifName(),"EPICS_IOC_LOG_INET","129.129.128.46","172.19.84.63","172.20.20.30") +putenv("EPICS_IOC_LOG_PORT=6500") + +# insert boot infos into database +bootNotify (INSTBASE, "sls/bin/iocBootNotify.sh") + +# run EPICS only on 1st network port +putenv("EPICS_CA_AUTO_ADDR_LIST=NO") +putenv(bootInfo("EPICS_CA_ADDR_LIST=%B")) +putenv(bootInfo("EPICS_CAS_INTF_ADDR_LIST=%e")) +putenv("EPICS_CAS_AUTO_BEACON_ADDR_LIST=NO") +putenv(bootInfo("EPICS_CAS_BEACON_ADDR_LIST=%B")) + +# try for user-defined menus scan and convert +dbLoadDatabase("dbd/scan.dbd") +dbLoadDatabase("dbd/convert.dbd") +dbLoadDatabase("dbd/slsConvert.dbd") + +#load standard drivers +require "base" +require "symbDev" +require "seq" + +# setup clock: +# 2008: putenv("TIMEZONE=MET::-60:033002:102603") +# 2009: +putenv("TIMEZONE=MET::-60:032902:102503") +# 2010: putenv("TIMEZONE=MET::-60:032802:103103") +# 2011: putenv("TIMEZONE=MET::-60:032702:103003") +# 2012: putenv("TIMEZONE=MET::-60:032502:102803") +ifenvsetnew(ifName(),"EPICS_TS_NTP_INET","129.129.190.1","172.19.11.101","172.20.10.10") +require "generalTime" +#EvtTimeConfigure(master?, sync_rate_sec, clock_rate_hz, master_port, slave_port, time_out_msec) +EvtTimeConfigure(0, 5, 500000, 18323, 18322, 250) + +AUTOSRHOST=bootHost() + +# $Id: R3.14.8,v 1.1 2009/12/22 11:03:10 zimoch Exp $ +# end of startup.script_common diff --git a/common b/common new file mode 100644 index 0000000..625fbc3 --- /dev/null +++ b/common @@ -0,0 +1,61 @@ +# set extended memory size (for startup.script_part3) +EXTENDED_MEMORY=sysPhysMemTop()-sysMemTop() + +cd LIB +#required for ifenvsetnew: +ld < utilitiesLib +# disable floating point exceptions +slsFppInit + +# setup mount points +ifenvsetnew (ifName(),"SLSFS01","129.129.145.52","172.19.11.101","172.20.10.10") +hostAdd ("slsfs01",getenv("SLSFS01")) +nfsMount (&sysBootHost, "/ioc", "/ioc") +nfsMount (&sysBootHost, "/home/ioc", "/home/ioc") +nfsMount ("slsfs01","/export/csa/releases/work","/work") +nfsMount ("slsfs01","/export/csa/releases/prod","/prod") +nfsMount ("slsfs01","/export/csa/releases/devl","/devl") +nfsMount ("slsfs01","/export/exchange","/exchange") +# cd to now mounted direcotry +cd LIB + +# load EPICS system core +ld < iocCore +ld < seq +# load EPICS tools like "require" +ld < miscLib +# next line allows to continue even if mounting failed +cd bootInfo("%H:") +cd HOME + +# setup logging +ifenvsetnew(ifName(),"EPICS_IOC_LOG_INET","129.129.128.46","172.19.84.63","172.20.20.30") +putenv("EPICS_IOC_LOG_PORT=6500") + +# insert boot infos into database +bootNotify (INSTBASE, "sls/bin/iocBootNotify.sh") + +# run EPICS only on 1st network port +putenv("EPICS_CA_AUTO_ADDR_LIST=NO") +putenv(bootInfo("EPICS_CA_ADDR_LIST=%B")) +putenv(bootInfo("EPICS_CAS_INTF_ADDR_LIST=%e")) +putenv("EPICS_CAS_AUTO_BEACON_ADDR_LIST=NO") +putenv(bootInfo("EPICS_CAS_BEACON_ADDR_LIST=%B")) + +# try for user-defined menus scan and convert +dbLoadDatabase("dbd/scan.dbd") +dbLoadDatabase("dbd/convert.dbd") +dbLoadDatabase("dbd/slsConvert.dbd") + +#load standard drivers +require "base" +require "slsDev" +require "ipac" + +# setup clock +putenv("EPICS_TS_MIN_WEST=-60") +ifenvsetnew(ifName(),"EPICS_TS_NTP_INET","129.129.190.1","172.19.11.101","172.20.10.10") +TSconfigure(0,10,10,18323,18322,250,1) + +# $Id: common,v 1.1 2009/12/22 11:03:10 zimoch Exp $ +# end of startup.script_common diff --git a/getbcast b/getbcast new file mode 100755 index 0000000..b91926a --- /dev/null +++ b/getbcast @@ -0,0 +1 @@ +/sbin/ifconfig | awk -F "[ :]+" '/Bcast/ { print $6}' diff --git a/makelinks b/makelinks new file mode 100755 index 0000000..d904d2f --- /dev/null +++ b/makelinks @@ -0,0 +1,5 @@ +ln -s R3.13 R3.13.9 +ln -s R3.13 R3.13.10 +ln -s syncTS R3.13.9.syncTS +ln -s syncTS R3.13.10.syncTS + diff --git a/saveRestore.script_common b/saveRestore.script_common new file mode 100644 index 0000000..3413b07 --- /dev/null +++ b/saveRestore.script_common @@ -0,0 +1,15 @@ +require "autoSRarray" + +dbLoadDatabase "save_restoreStatus.db", TEMPLATES, bootInfo("P=%T:") +autoSRhookInit + +# +save_restoreSet_Debug 0 +save_restoreSet_IncompleteSetsOk 1 +save_restoreSet_DatedBackupFiles 1 +save_restoreSet_NumSeqFiles 3 +save_restoreSet_SeqPeriodInSeconds 600 +save_restoreSet_status_prefix bootInfo("%T:") +# +set_requestfile_path CFG +set_savefile_path bootInfo("/archiver-data/autoSR/%T") diff --git a/startup.script_common b/startup.script_common new file mode 100644 index 0000000..b9b7b79 --- /dev/null +++ b/startup.script_common @@ -0,0 +1,43 @@ +# This is the common part of all startup scripts +# It is included by all generated scripts + +# The following variables should be set before: +# * IOC the system name of the ioc +# * INSTBASE where to boot from +# * SLSBASE alias for INSTBASE +# * EPICS the epics release (e.g "R3.13.9") +# * ARCH the vxWorks architecture (e.g. "T1-ppc604") + +# Accept SLSBASE or INSTBASE +PBASE=0 +symFindByName(sysSymTbl,"INSTBASE",&PBASE,0) +symFindByName(sysSymTbl,"SLSBASE",&PBASE,0) +SLSBASE=*PBASE +INSTBASE=*PBASE + +STRINGBUFFER=malloc(256) + +# set the prompt +sprintf (STRINGBUFFER, "%s (startup.script aborted) > ", IOC) +shellPromptSet (STRINGBUFFER) + +# create some path variables +HOME=malloc(80) +sprintf (HOME, "/ioc/%s", IOC) + +CFG=malloc(80) +sprintf (CFG, "%s/cfg", HOME) + +STREAM_PROTOCOL_DIR=malloc(80) +sprintf (STREAM_PROTOCOL_DIR, "%s/cfg", HOME) + +LIB=malloc(80) +sprintf (LIB, "%s/iocBoot/%s/%s", INSTBASE, EPICS, ARCH) + +TEMPLATES=malloc(80) +sprintf (TEMPLATES, "%s/iocBoot/templates", INSTBASE) + +#Load EPICS version dependent script +sprintf (STRINGBUFFER, "%s/iocBoot/startup/%s", INSTBASE, EPICS) +ioGlobalStdSet (0, open (STRINGBUFFER, 0, 0)) +#startup script contiues at /iocBoot/startup/ diff --git a/startup.script_iocmon b/startup.script_iocmon new file mode 100644 index 0000000..926bd68 --- /dev/null +++ b/startup.script_iocmon @@ -0,0 +1,2 @@ +require "iocmon" +dbLoadDatabase("iocmon.template", TEMPLATES, bootInfo("CRATE=%T")) diff --git a/startup.script_linux b/startup.script_linux new file mode 100644 index 0000000..400fee5 --- /dev/null +++ b/startup.script_linux @@ -0,0 +1,3 @@ +epicsEnvSet EPICS, R3.14.8 +epicsEnvSet STREAM_PROTOCOL_PATH, .:$(PWD)/cfg +epicsEnvSet EPICS_DRIVER_PATH, bin:snl:$(INSTBASE)/iocBoot/$(EPICS)/$(EPICS_HOST_ARCH) diff --git a/startup.script_part2 b/startup.script_part2 new file mode 100644 index 0000000..4a84a48 --- /dev/null +++ b/startup.script_part2 @@ -0,0 +1,13 @@ +# 2nd part of common startup +iocInit + +# initialize records +sprintf (STRINGBUFFER, "%s/sls/bin/loadAllSettings.sh", INSTBASE) +rsh (bootHost(), STRINGBUFFER, IOC, "default") + +# insert record list into database +listRecords (bootInfo("/home/ioc/%T.dbl"), "RTYP DESC") +sprintf (STRINGBUFFER, "%s/sls/bin/dbl2odb.sh", INSTBASE) +rsh (bootHost(), STRINGBUFFER, IOC, bootInfo("%B"), getenv("EPICS_CA_SERVER_PORT"), "&") + +# end of startup.script_part2 diff --git a/startup.script_part3 b/startup.script_part3 new file mode 100644 index 0000000..77816cf --- /dev/null +++ b/startup.script_part3 @@ -0,0 +1,6 @@ +#Enable memory >32MB on IOC that have it. (Is a NOOP on all others) +memAddToPool (sysMemTop(),EXTENDED_MEMORY) + +# set the prompt +sprintf (STRINGBUFFER, "%s > ", IOC) +shellPromptSet (STRINGBUFFER) diff --git a/syncTS b/syncTS new file mode 100644 index 0000000..2d6c20b --- /dev/null +++ b/syncTS @@ -0,0 +1,64 @@ +# set extended memory size (for startup.script_part3) +EXTENDED_MEMORY=sysPhysMemTop()-sysMemTop() + +cd LIB +#required for ifenvsetnew: +ld < utilitiesLib +# disable floating point exceptions +slsFppInit + +# setup mount points +ifenvsetnew (ifName(),"SLSFS01","129.129.145.52","172.19.11.101","172.20.10.10") +hostAdd ("slsfs01",getenv("SLSFS01")) +nfsMount (&sysBootHost, "/ioc", "/ioc") +nfsMount (&sysBootHost, "/home/ioc", "/home/ioc") +nfsMount ("slsfs01","/export/csa/releases/work","/work") +nfsMount ("slsfs01","/export/csa/releases/prod","/prod") +nfsMount ("slsfs01","/export/csa/releases/devl","/devl") +nfsMount ("slsfs01","/export/exchange","/exchange") +# cd to now mounted direcotry +cd LIB + +# load EPICS system core +ld < iocCore.syncTS +ld < seq +# load EPICS tools like "require" +ld < miscLib +# next line allows to continue even if mounting failed +cd bootInfo("%H:") +cd HOME + +# setup logging +ifenvsetnew(ifName(),"EPICS_IOC_LOG_INET","129.129.128.46","172.19.84.63","172.20.20.30") +putenv("EPICS_IOC_LOG_PORT=6500") + +# insert boot infos into database +bootNotify (SLSBASE, "sls/bin/iocBootNotify.sh") + +# run EPICS only on 1st network port +putenv("EPICS_CA_AUTO_ADDR_LIST=NO") +putenv(bootInfo("EPICS_CA_ADDR_LIST=%B")) +putenv(bootInfo("EPICS_CAS_INTF_ADDR_LIST=%e")) +putenv("EPICS_CAS_AUTO_BEACON_ADDR_LIST=NO") +putenv(bootInfo("EPICS_CAS_BEACON_ADDR_LIST=%B")) + +# try for user-defined menus scan and convert +dbLoadDatabase("dbd/scan.dbd") +dbLoadDatabase("dbd/convert.dbd") +dbLoadDatabase("dbd/slsConvert.dbd") + +#load standard drivers +require "base" +require "slsDev" +require "ipac" + +# setup clock +require "mrcevg" +require "mrcevr" +require "TSstat" +putenv("EPICS_TS_MIN_WEST=-60") +ifenvsetnew(ifName(),"EPICS_TS_NTP_INET","129.129.190.2","172.19.11.101","172.20.10.10") +TSconfigure(0,20,1000,18323,18322,250,0) + +# $Id: syncTS,v 1.1 2009/12/22 11:03:11 zimoch Exp $ +# end of startup.script_common