From 747f07c8249ecdcba13e73586beb590e6998ea15 Mon Sep 17 00:00:00 2001
From: Peter Zumbruch
Date: Mon, 11 Nov 2013 11:50:58 +0100
Subject: [PATCH] added stats.db into startup of IOCs to allow view from
Detector Controls 'cpu' gui
---
evtbuild.tex | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/evtbuild.tex b/evtbuild.tex
index 6b59c85..ea28661 100644
--- a/evtbuild.tex
+++ b/evtbuild.tex
@@ -490,6 +490,8 @@ The structure of the module is as follows:
\item errbit1.db, errbit2.db - Records to monitor error bits from each data source.
\item errbitstat.db - Records to monitor erro bit patterns (up to 5 patterns).
\item cpu.db - Records to monitor CPU usage on the event builder servers.
+ \item stats.db - Records to monitor basic CPU usage on the event builder
+ servers, used by slow control
\end{itemize}
\item \textbf{Source code of EPICS IOC: ebctrl/ioc/ebctrlApp/src/}
\begin{itemize}
@@ -539,8 +541,6 @@ When starting IOC the script executes writeIOC\_stcmd() subroutine which writes
\begin{verbatim}
#!../../bin/linux-x86_64/ebctrl
-## You may have to change ebctrl to something else
-## everywhere it appears in this file
## Set EPICS environment
< envPaths
@@ -561,7 +561,7 @@ dbLoadDatabase("dbd/ebctrl.dbd")
ebctrl_registerRecordDeviceDriver(pdbbase)
## Load record instances
-dbLoadTemplate "db/userHost.substitutions"
+dbLoadRecords("db/stats.db", "PREFIX=HAD:IOC:,IOC=${HOSTNAME}")
dbLoadRecords("db/evtbuild.db","eb=$ebnum")
dbLoadRecords("db/netmem.db","eb=$ebnum")
dbLoadRecords("db/errbit1.db","eb=$ebnum")
@@ -604,14 +604,12 @@ where:
\end{itemize}
During the startup of IOCs the start\_eb\_gbe.pl script copies st\_eb01.cmd files to the corresponding Event Builder servers - scs@lxhadeb01.gsi.de:/home/scs/ebctrl/ioc/iocBoot/iocebctrl/.
-Then the startIOC() subroutine executes remotely on EB server via ssh the following command: \textbf{bash; . /home/scs/.bashrc; cd \$ioc\_dir; screen -dmS \$screen\_name ../../bin/linux-x86\_64/ebctrl \$stcmd}. Where \$ioc\_dir = /home/scs/ebctrl/ioc/iocBoot/iocebctrl/, \$screen\_name = ioc\_eb02, \$stcmd = st\_eb02.cmd.
+Then the startIOC() subroutine executes remotely on EB server via ssh the following command: \textbf{bash; . /home/scs/.bashrc; export HOSTNAME=\textbackslash\textbackslash\textbackslash\$(hostname); cd \$ioc\_dir; screen -dmS \$screen\_name ../../bin/linux-x86\_64/ebctrl \$stcmd}. Where \$ioc\_dir = /home/scs/ebctrl/ioc/iocBoot/iocebctrl/, \$screen\_name = ioc\_eb02, \$stcmd = st\_eb02.cmd.
The real IOC startup output copied from the screen:
\begin{verbatim}
#!../../bin/linux-x86_64/ebctrl
-## You may have to change ebctrl to something else
-## everywhere it appears in this file
## Set EPICS environment
< envPaths
epicsEnvSet(ARCH,"linux-x86_64")
@@ -631,7 +629,7 @@ cd /home/scs/ebctrl/ioc
dbLoadDatabase("dbd/ebctrl.dbd")
ebctrl_registerRecordDeviceDriver(pdbbase)
## Load record instances
-dbLoadTemplate "db/userHost.substitutions"
+dbLoadRecords("db/stats.db", "PREFIX=HAD:IOC:,IOC=${HOSTNAME}")
dbLoadRecords("db/evtbuild.db","eb=eb02")
dbLoadRecords("db/netmem.db","eb=eb02")
dbLoadRecords("db/errbit1.db","eb=eb02")
--
2.43.0