I didn't mean that the epicsEnvShow didn't show lots of other values -
just that (I presume) that the base code looks for and uses any values
set for specific environment variables (such as the EPICS_XXX ones, like
EPICS_CA_ADDR_LIST).
But epicsEnvShow definitely doesn't show all the same values that my
bash shell (the same one used to launch the IOC shell) shows.
NOTE that even in YOUR example, IOCSH_PS1 is NOT in the values shown by
epicsEnvShow.
(NOTE: The following lists are sorted to make them easier to compare)
________________________________________________________
Here is the list of environment variables from my bash shell (note that
IOCSH_PS1 does have a value - with the newline - in my bash shell
environment variables):
APPTOP=/home/epics/appTop
boot=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot
CLASSPATH=/home/epics/R3.14.9/extensions/javalib:/home/epics/R3.14.9/extensions/javalib
CVS_ACCOUNT=davis
CVSROOT=:ext:[email protected]:/projects/cvsroots/electronics/eecvs
CVS_RSH=ssh
DISPLAY=192.168.100.54:0.0
EDMDATAFILES=/home/epics/edl
EDMFILES=/home/epics/edm_exec
EDMHELPFILES=/home/epics/R3.14.12.2/extensions/src/edm/helpFiles
EDM=/home/epics/edm_exec
EDMOBJECTS=/home/epics/edm_exec
EDMPVOBJECTS=/home/epics/edm_exec
EHOME=/home/epics
EPICS_BASE=/home/epics/R3.14.12.2/base-3.14.12.2
EPICS_EXTENSIONS=/home/epics/R3.14.12.2/extensions
EPICS_HOST_ARCH=linux-x86
EPICS_MODULES=/home/epics/R3.14.12.2/modules
EPICS_REL=3.14.12.2
EPICS_RELdot=3.14.12.2
ftp_proxy=ftp://webproxy.nscl.msu.edu:3128/
HOME=/home/epics
HOST_ARCH=linux-x86
http_proxy=http://webproxy.nscl.msu.edu:3128/
https_proxy=https://webproxy.nscl.msu.edu:3128/
INCLUDE=../inc:/usr/include:/usr/include/sys:/usr/include/linux:/home/epics/R3.14.12.2/base-3.14.12.2/include:/home/epics/R3.14.12.2/base-3.14.12.2/include/os/vxWorks
IOCSH_PS1=
mdlinux>
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/home/epics/R3.14.12.2/base-3.14.12.2/lib/linux-x86:/usr/share/qt4/plugins/designer:/home/epics/Qt/plugins/designer
LLAPP=/home/epics/appTop
LOCDIR=/home/epics/Qt/INSTALL/stuff
LOGNAME=epics
MAIL=/var/mail/epics
md=/home/epics/R3.14.12.2/apps/mdlinux
MY_EPICS_BASE=/home/epics/R3.14.12.2/base-3.14.12.2
NCSAPPDIR=/home/ncsapps
NCSDIR=/home/epics
NCSMNT=/mnt/expdc01/ncsdata/General
OLDPWD=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot
PATH=/opt/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/lib:/usr/X11R6/bin:/usr/bin/X11:/home/epics/util/bin:/home/epics/util/scripts:/home/epics/edm_exec:/home/epics/R3.14.12.2/base-3.14.12.2/bin/linux-x86:/home/epics/R3.14.12.2/extensions/bin/linux-x86:/usr/share/qt4/bin:../DeviceOptions:/home/util/bin:/usr/lib/libreoffice/program:.
PS1=\ndavis-pc:/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib>
PSPRINTER=lp
PWD=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib
QTDIR=/usr/share/qt4
QT_PLUGIN_PATH=/usr/share/qt4/plugins:/home/epics/Qt/plugins
QTWORK=/home/epics/Qt
QWTDIR=/usr/local/qwt-5.2.1
SHELL=/bin/bash
SHLVL=1
socks_proxy=socks://webproxy.nscl.msu.edu:3128/
SSH_CLIENT=192.168.100.54 53343 22
SSH_CONNECTION=192.168.100.54 53343 192.168.100.208 22
SSH_TTY=/dev/pts/1
TERM=xterm
USER=epics
XDG_SESSION_COOKIE=330224d9007994337e5b38cd0000000a-1392642586.628682-1533320896
_=/usr/bin/env
________________________________________________________
And here is what the IOC shell shows:
ARCH=linux-x86
AUTOSAVE=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib
bbmStorageFile=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib/bbm.storage
bcmTCP_ID=0x0003
bcmTCP_IP=192.168.125.4
bcmTCP_SUBNET=255.255.0.0
bcmTCP_UNIT=Z_bcmTEST
BROWSER=firefox
CLASSPATH=/usr/local/epics/extensions/javalib
COLUMNS=144
DISPLAY=192.168.100.54:0.0
EPICS_BASE=/home/epics/R3.14.12.2/base-3.14.12.2
EPICS_HOST_ARCH=linux-x86
EPICS_IOC_CA_PUT_LOG_INET=192.168.4.10
EPICS_IOC_CA_PUT_LOG_PORT=7010
EPICS_IOC_LOG_INET=192.168.4.7
ftp_proxy=ftp://webproxy.nscl.msu.edu:3128/
HOME=/home/epics
HOSTNAME=davis-pc
http_proxy=http://webproxy.nscl.msu.edu:3128/
https_proxy=https://webproxy.nscl.msu.edu:3128/
IOC=iocFrib
IOCSH_STARTUP_SCRIPT=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib/st.cmd
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/home/epics/R3.14.12.2/base-3.14.12.2/lib/linux-x86:/usr/local/lib:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/ether_ip/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/snmp/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/sscan-2-7/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/StreamDevice/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/asyn4-21/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/seq-2.1.9/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/gemt6k/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/heik/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/modbusR2-4/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/calc-2-9/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/busy-1-4/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/autosav!
e-4-8/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/std-3-1/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/ip-2-13/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/ipac-2-11/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/delaygen-1-0-7/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/ebitDlyGen/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/nsclfrib/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/zmod/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/DirectCA/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/FastCounter/lib/linux-x86:/home/epics/R3.14.12.2/base-3.14.12.2/../modules/soft/PPG_Counter/lib/linux-x86
LINES=54
LOGNAME=root
MAIL=/var/mail/root
ModularPS_ID=0x00f4
ModularPS_IP=192.168.250.244
ModularPS_SUBNET=255.255.0.0
ModularPS_UNIT=Z_ModularPS
OLDPWD=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/epics/extensions/bin/linux-x86:/home/epics/R3.14.12.2/apps/mdlinux/bin/linux-x86
ps8rack_ID=0x00f5
ps8rack_IP=192.168.250.245
ps8rack_SUBNET=255.255.0.0
ps8rack_UNIT=Z_ps8rack
PSPRINTER=lp
PWD=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib
REQFILES=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib
SHELL=/bin/bash
SHLVL=1
socks_proxy=socks://webproxy.nscl.msu.edu:3128/
SSCAN=/home/epics/R3.14.12.2/apps/mdlinux/../../modules/soft/sscan-2-7/sscanApp
STREAM_PROTOCOL_PATH=/home/epics/R3.14.12.2/apps/mdlinux/../common/protocol
SUDO_COMMAND=/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/runioc start
SUDO_GID=1001
SUDO_UID=1001
SUDO_USER=epics
SUPPORT=/home/epics/R3.14.12.2/apps/mdlinux/../../modules/soft
TERM=xterm
TOP=/home/epics/R3.14.12.2/apps/mdlinux
TOPNAME=mdlinux
USERNAME=root
USER=root
_=/home/epics/R3.14.12.2/apps/mdlinux/bin/linux-x86/test
On 2/27/2014 10:03 AM, Mark Rivers wrote:
Hi Mark,
I don't understand this comment:
Unfortunately, it doesn't appear to pay any attention to the bash shell environment variables (
excluding, of course, the standard ones the EPICS code itself requires, such as the EPICS_XXX ones,
shown by the epicsParamShow command).
When I do "epicsEnvShow" inside my IOC I see all environment variables from my shell, not just the EPICS_XXX ones:
epics> epicsEnvShow
EDMOBJECTS=/usr/local/epics/extensions/src/edm/setup
REMOTEHOST=denali.cars.aps.anl.gov
MPI_INCLUDE=/usr/include/mpich2-x86_64
MANPATH=/usr/share/man/mpich2:/usr/share/man:/usr/local/share/man
XDG_SESSION_ID=75630
HOSTNAME=corvette.cars.aps.anl.gov
LENPAGE=280
HOST=corvette.cars.aps.anl.gov
TERM=vt100
SHELL=/bin/tcsh
IDL_STARTUP=/usr/local/idl_user/idl_startup.pro
LATEX_MK_DIR=/usr/share/latex-mk
EPICS_SUPPORT_PATH=/home/epics/support
SSH_CLIENT=164.54.160.85 59354 22
IDL_DIR=/usr/local/exelis/idl82
gsas=/home/epics/CEAD/gsas
CVSROOT=/usr/local/cvs
EDMHELPFILES=/usr/local/epics/extensions/src/edm/helpFiles
OLDPWD=/home/epics/support/CARS/iocBoot/ioc13bmc_GPD_XPS
EPICS_IOC_LOG_FILE_LIMIT=10000000
QTDIR=/usr/lib64/qt-3.3
CAQTDM_DISPLAY_PATH=/usr/local/caQtDM/2-6-6/caQtDM/parser:/home/epics/ui
QTINC=/usr/lib64/qt-3.3/include
EDMPVOBJECTS=/usr/local/epics/extensions/src/edm/setup
SSH_TTY=/dev/pts/33
ATMXSECT=/home/epics/CEAD/gsas/data/atmxsect.dat
MPI_PYTHON_SITEARCH=/usr/lib64/python2.7/site-packages/mpich2
GROUP=epics
USER=epics
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/epics/extensions/lib/linux-x86
LS_COLORS=no=00:fi=00:di=01;34:ln=04;31:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=30:sg=30:tw=30:ow=34:st=30:ex=04;30:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;34:*.au=00;34:*.flac=00;34:*.mid=00;34:*.midi=00;34:*.mka=00;!
34!
:*.mp3=00;34:*.mpc=00;34:*.ogg=00;34:*.ra=00;34:*.wav=00;34:
MCA_PREFERENCES=/home/epics/mca.preferences
EPICS_BASE=/corvette/usr/local/epics/base-3.14.12.3
HOSTTYPE=x86_64-linux
GSASDIR=/home/epics/CEAD/gsas
MPI_LIB=/usr/lib64/mpich2/lib
EPICS_EXTENSIONS=/usr/local/epics/extensions
GRAPHCAP=X11
SUPPORT=/corvette/home/epics/support
MAIL=/usr/spool/mail/epics
PATH=.:/home/epics/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/epics/base/bin/linux-x86:/usr/local/epics/extensions/bin/linux-x86
XRF_PEAK_LIBRARY=/usr/local/idl_user/epics_mca/xrf_peak_library.txt
EPICS_HOST_ARCH=linux-x86
MPI_BIN=/usr/lib64/mpich2/bin
MPI_COMPILER=mpich2-x86_64
EDMFILES=/usr/local/epics/extensions/src/edm/setup
PWD=/home/epics/support/CARS/iocBoot/ioc13bmc_GPD_XPS
_LMFILES_=/etc/modulefiles/mpich2-x86_64
FIT2D=/home/epics/CEAD/fit2d
upcase=/home/epics/CEAD/gsas/upcase
ATOMDATA=/home/epics/CEAD/gsas/data/atmdata.dat
LANG=C
KDE_IS_PRELINKED=1
PYTHONSTARTUP=/home/epics/.python
EPICS_DISPLAY_PATH=/home/epics/adl/all
MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles
LOADEDMODULES=mpich2-x86_64
KDEDIRS=/usr
PGPLOT_XW_WIDTH=0.75
EXELIS_DIR=/usr/local/exelis
JCPDS_PATH=/usr/local/idl_user/epics_mca/jcpds/
[email protected]
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
MPI_SYSCONFIG=/etc/mpich2-x86_64
SHLVL=4
HOME=/home/epics
OSTYPE=Linux
GDL_PATH=+/usr/share/gnudatalanguage/lib:+/usr/local/idl_user
MPI_SUFFIX=_mpich2
PSPRINTER=gse_lom
IDL_PATH=<IDL_DEFAULT>:+/usr/local/idl_user
MPI_MAN=/usr/share/man/mpich2
PGPLOT_DIR=/home/epics/CEAD/gsas/pgl
EPICS_IOC_LOG_FILE_NAME=/home/epics/logs/IOC.log
VENDOR=unknown
PYTHONPATH=/usr/local/python/epics
MACHTYPE=x86_64
LOGNAME=epics
QTLIB=/usr/lib64/qt-3.3/lib
CVS_RSH=ssh
CLASSPATH=/usr/local/epics/extensions/javalib
SSH_CONNECTION=164.54.160.85 59354 164.54.160.82 22
MPI_HOME=/usr/lib64/mpich2
MPI_FORTRAN_MOD_DIR=/usr/include/mpich2-x86_64
MODULESHOME=/usr/share/Modules
LESSOPEN=||/usr/bin/lesspipe.sh %s
XDG_RUNTIME_DIR=/run/user/epics
DISPLAY=localhost:23.0
EPICS_CA_MAX_ARRAY_BYTES=20000000
IDL_ABS_COEFFS=/usr/local/idl_user/synchrotron/sruff/abs_coeffs.xdr
GSASEXE=/home/epics/CEAD/gsas/exe
G_BROKEN_FILENAMES=1
CCACHE_HASHDIR=
_=../../bin/linux-x86/CARSApp
IOCSH_STARTUP_SCRIPT=st.cmd
ARCH=linux-x86
IOC=ioc13bmc_GPD_XPS
TOP=/home/epics/support/CARS
ALLEN_BRADLEY=/corvette/home/epics/support/allenBradley-2-2
AREA_DETECTOR=/corvette/home/epics/support/areaDetector-1-10
ASYN=/corvette/home/epics/support/asyn-4-22
AUTOSAVE=/corvette/home/epics/support/autosave-5-1
BUSY=/corvette/home/epics/support/busy-1-6
CALC=/corvette/home/epics/support/calc-3-2
CAMAC=/corvette/home/epics/support/camac-2-7
CARS=/corvette/home/epics/support/CARS
DAC128V=/corvette/home/epics/support/dac128V-2-7
DELAYGEN=/corvette/home/epics/support/delaygen-1-1-0
DXP=/corvette/home/epics/support/dxp-3-2
IP=/corvette/home/epics/support/ip-2-14
IPAC=/corvette/home/epics/support/ipac-2-11
IP330=/corvette/home/epics/support/ip330-2-7
IPUNIDIG=/corvette/home/epics/support/ipUnidig-2-9
LOVE=/corvette/home/epics/support/love-3-2-5
MCA=/corvette/home/epics/support/mca-7-4
MODBUS=/corvette/home/epics/support/modbus-2-4
MOTOR=/corvette/home/epics/support/motor-6-8
OPTICS=/corvette/home/epics/support/optics-2-9
QUADEM=/corvette/home/epics/support/quadEM-4-0
SNCSEQ=/corvette/home/epics/support/seq-2-1-10
SOFTGLUE=/corvette/home/epics/support/softGlue-2-3
SSCAN=/corvette/home/epics/support/sscan-2-9
STD=/corvette/home/epics/support/std-3-2
STREAM=/corvette/home/epics/support/stream-2-6
TPMAC=/corvette/home/epics/support/tpmac-3-10dls10
VME=/corvette/home/epics/support/vme-2-8-1
VXSTATS=/corvette/home/epics/support/vxStats-1-7-2h
LINES=24
COLUMNS=80
Are you talking about a soft IOC or vxWorks IOC?
Mark
________________________________
From: [email protected] [[email protected]] on behalf of Mark Davis [[email protected]]
Sent: Thursday, February 27, 2014 8:16 AM
To: Eric Norum; [email protected]
Cc: [email protected]
Subject: Re: newline in IOCSH_PS1 value
I had tried the continued line approach (a '\' as the last character). But all attempts to include a line break withing the string just results in an error:
##--- set IOC shell prompt ---
epicsEnvSet IOCSH_PS1, "\
st.cmd -- Line 200 -- Unbalanced quote.
mdlinux> "
st.cmd -- Line 201 -- Unbalanced quote.
I had not thought of setting a value before launching the IOC shell. Unfortunately, it doesn't appear to pay any attention to the bash shell environment variables (excluding, of course, the standard ones the EPICS code itself requires, such as the EPICS_XXX ones, shown by the epicsParamShow command).
Now that I am looking for it, I am surprised that I have not been able to find even so much as a hint that commands in the IOC shell can make use of arbitrary environment variables that are set anywhere other than within the IOC shell itself (i.e. other than the special-case/standard ones). I had assumed that this WAS possible, even if it required some command to do so. But I have yet to find any command to due this, or any mention at all of some built-in way logic to support it).
Even more interesting is IOCSH_PS1 itself. Although the epicsEnvSet command is used to set it, epicsEnvShow says it is NOT an environment variable:
epics> epicsEnvShow IOCSH_PS1
IOCSH_PS1 is not an environment variable.
(also not in the list shown if you just type epicsEnvShow)
Perhaps your examples require a newer version of EPICS? (I am using R3.14.12.2) But again, numerous Google searches have failed to turn up any document that mentions this one way or the other.
On 2/26/2014 4:54 PM, Eric Norum wrote:
You can set the variable outside the IOC:
export IOCSH_PS1="ABC
DEF> "
../../bin/darwin-x86/example st.cmd
...
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncExample, "user=ericHost"
ABC
DEF>
And this seems to work inside the st.cmd file:
epicsEnvSet IOCSH_PS1 "ABC\
DEF> "
../../bin/darwin-x86/example st.cmd
. . .
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncExample, "user=ericHost"
ABC
DEF>
On Feb 26, 2014, at 1:10 PM, Mark Davis <[email protected]<mailto:[email protected]>> wrote:
Anybody happen to know of a way to include a newline in the IOCSH_PS1 value?
I can include one by manually typing the command in to the IOC shell after it is started:
epics>
epics> epicsEnvSet IOCSH_PS1 " <---- Ctl+V, Ctl+J typed here....
becoladaq> "
becoladaq>
becoladaq>
But I cannot find any way to do this from the st.cmd startup script. I have tried using "\n", hex, octal values, etc. Nothing seems to work.
Mark Davis
NSCL/FRIB
--
Eric Norum
[email protected]<mailto:[email protected]>
- Replies:
- Re: newline in IOCSH_PS1 value Andrew Johnson
- References:
- newline in IOCSH_PS1 value Mark Davis
- Re: newline in IOCSH_PS1 value Eric Norum
- Re: newline in IOCSH_PS1 value Mark Davis
- RE: newline in IOCSH_PS1 value Mark Rivers
- Navigate by Date:
- Prev:
Re: Monitoring whether an IP device is connected or not Pearson, Matthew R.
- Next:
Re: newline in IOCSH_PS1 value Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: newline in IOCSH_PS1 value Mark Rivers
- Next:
Re: newline in IOCSH_PS1 value Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|