iocConsole is an EPICS extension used at various EPICS installations to create and manage a persistent console session into IOC's.
iocConsole wraps the GNU screen program and creates/maintains screen sessions for each IOC.
Typically, a user connects to an IOC using a command like iocConsole sioc-sys0-tm00.
The connection details of the IOC's, sioc-sys0-tm00 in this example, are maintained in a screeniocs configuration file.
iocConsole is available as a git repository on AFS; the install bundle is a tar.gz of the git repo using a version tag. For example, pyIocConsole_V_1_0_6.tar.gz is a tar.gz of the V_1_0_6 checkout of the pyIocConsole git repo.
To install iocConsole from the install bundle pyIocConsole_V_1_0_6.tar.gz,
iocConsole is typically installed in the ${TOOLS}/script folder. Change your directory to this folder using cd ${TOOLS}/scriptrelease/pyIocConsole in ${TOOLS}/script using mkdir --parents release/pyIocConsolerelease/pyIocConsole folder using cd release/pyIocConsolepyIocConsole_V_1_0_6.tar.gz in the ${TOOLS}/script/release/pyIocConsole folder using tar zxf /Path/To/pyIocConsole_V_1_0_6.tar.gz
This should create a folder called pyIocConsole_V_1_0_6 in the ${TOOLS}/script/release/pyIocConsole folder
${TOOLS}/script folder using cd ${TOOLS}/script${TOOLS}/script folder, create a softlink called pyIocConsole using ln -s release/pyIocConsole/pyIocConsole_V_1_0_6 pyIocConsole.
Now, if you do a ls -l pyIocConsole, you should see a softlink like so
$ ls -l pyIocConsole
lrwxr-xr-x 1 user grp 28 May 12 15:08 pyIocConsole -> release/pyIocConsole/pyIocConsole_V_1_0_6/
${TOOLS}/script, create a softlink to the iocConsole helper script pyiocscreen.py using ln -s pyIocConsole/pyiocscreen.py pyiocscreen.py
${TOOLS}/script, create a softlink to the iocConsole main script iocConsole using ln -s pyIocConsole/iocConsole iocConsole
ls -l ${TOOLS}/script/ | grep pyIocConsole, you should see a set of softlinks like so
$ ls -l ${TOOLS}/script/ | grep pyIocConsole
lrwxr-xr-x 1 user grp 23 May 12 15:41 iocConsole -> pyIocConsole/iocConsole*
lrwxr-xr-x 1 user grp 28 May 12 15:08 pyIocConsole -> release/pyIocConsole/pyIocConsole_V_1_0_6/
lrwxr-xr-x 1 user grp 27 Apr 22 13:07 pyiocscreen.py -> pyIocConsole/pyiocscreen.py*
screeniocs is setup correctly, you can test the install by listing the IOC's in your facility by executing a ./iocConsole --listiocConsole to a new version using the install bundle pyIocConsole_V_1_0_7.tar.gz,
${TOOLS}/script/release/pyIocConsole using cd ${TOOLS}/script/release/pyIocConsolepyIocConsole_V_1_0_7.tar.gz in the ${TOOLS}/script/release/pyIocConsole folder using tar zxf /Path/To/pyIocConsole_V_1_0_7.tar.gz
This should create a folder called pyIocConsole_V_1_0_7 in the ${TOOLS}/script/release/pyIocConsole folder
${TOOLS}/script using cd ${TOOLS}/scriptpyIocConsole softlink to the new pyIocConsole_V_1_0_7 release using
rm pyIocConsoleln -s release/pyIocConsole/pyIocConsole_V_1_0_7 pyIocConsolels -l ${TOOLS}/script/ | grep pyIocConsole, you should see a set of softlinks like so
$ ls -l ${TOOLS}/script/ | grep pyIocConsole
lrwxr-xr-x 1 user grp 23 May 12 15:41 iocConsole -> pyIocConsole/iocConsole*
lrwxr-xr-x 1 user grp 28 May 12 15:08 pyIocConsole -> release/pyIocConsole/pyIocConsole_V_1_0_7/
lrwxr-xr-x 1 user grp 27 Apr 22 13:07 pyiocscreen.py -> pyIocConsole/pyiocscreen.py*
iocConsole relies on a configuration file called screeniocs that contains the details for the IOC's.
The screeniocs is external to the iocConsole package and is located using the IOC_SCREEN environment variable.
$ ls -l ${IOC_SCREEN}/screeniocs
-rw-rw-r-- 1 user grp 84192 Jul 2 11:22 /path/to/iocCommon/All/Dev/screeniocs
screeniocs using iocConsole -h which print the location of the screeniocs as part of the help text.
screeniocs file is a text file that can contain
# This is a comment.
# -------- This is a line -----------------
# Host where
# Alias Terminal Port No. screen is run Comments (must start with #)
#------- ------------- ------- -------------- ---------------------------------
ioc-b34-im01 ts-lclsdev07 2002 lcls-dev1 # b34-254-lab -(Dave Brown)
In this example,
ioc-b34-im01 is the name of the IOC that will be used with iocConsole, for example, iocConsole ioc-b34-im01ts-lclsdev07 is the terminal server that we need to connect to2002 is the TCP/IP port on the terminal server, ts-lclsdev07 that we need to connect tolcls-dev1 is the host where the screen session is runiocConsole. For example,
# Matlab Support soft IOCs
sioc-sys0-ml00 /afs/slac/g/lcls/epics/iocCommon/sioc-sys0-ml00/iocSpecificRelease/bin/linux-x86/matlabSupport sioc lcls-dev1
sioc-sys0-ml00 is the name of the IOC that will be used with iocConsole, for example, iocConsole sioc-sys0-ml00/afs/slac/g/lcls/epics/iocCommon/sioc-sys0-ml00/iocSpecificRelease/bin/linux-x86/matlabSupport is the path to the executable that will be used to start up the soft IOC (if it has not been started up already).sioc is a hardcoded string that identifies this entry as a soft IOC.lcls-dev1 is the machine where the softIOC and thus, the screen session are run.ssh. For example,
# Virtual IOC Computer Host User Description
# ===================================================================================================================
vioc-b34-rf11 ioc-b34-cd35 daemon # uTCA LLRF IOC TestStand
vioc-b34-rf11 is the name of the IOC that will be used with iocConsole, for example, iocConsole vioc-b34-rf11ioc-b34-cd35 is the machine that ssh to.daemon is the user id used for the ssh session.iocConsole relies on a set of environment variables for its functioning.
screeniocs file - which is ${IOC_SCREEN}/screeniocsiocConsole supports a verbose mode that provides a lot of detailed logs to help diagnose issues. For example, run iocConsole -v sioc-troubled-ioc to see what's happening under the covers.
iocConsole has been thru multiple iterations - Stephanie Allison, Debbie Rogind, Jingchen Zhou, Steve Norum and Judy Rock have been involved at some time or another.
Judy Rock maintained the definitive Perl version for many years; during her tenure, the Perl version was ported to Python.
The Python version is currently working its way thru the various facilities.