6. How to run SSH Monitor#
Prerequisites:
Once the prerequisites have been followed, you can run SSH Monitor like so:
Change directory to the
ioc*folder of theiocBootdirectory of your Top, e.g.:$ cd /path/to/myTargetMonitoringTop/iocBoot/iocMyTargetMonitoring
Check the first line of the .cmd (i.e. the Shebang) and make sure that the relative location indicated here is valid (i.e. it points to an existing binary program). E.g.:
$ head -n 1 st_target1.cmd #!../../bin/linux-x86_64/myTargetMonitoring $ ls ../../bin/linux-x86_64/myTargetMonitoring ../../bin/linux-x86_64/myTargetMonitoring $ echo $? 0
See also
More details about Shebangs in the
.cmdexplanations.If running multiple IOC programs in parallel on the same machine, then make sure that each IOC program defines a unique
EPICS_CAS_SERVER_PORTwith theepicsEnvSetIOC Shell command. You can refer to the syntax used in the.cmdand.substitutionshow-to (detailed in the.cmdexplanations). The reasons about why are given in the TCP ports limitations explanations.$ grep "EPICS_CAS_SERVER_PORT" st_target1.cmd epicsEnvSet("EPICS_CAS_SERVER_PORT", "5064")
Make sure the .cmd file is executable and run it. E.g.:
$ if [[ ! -x st_target1.cmd ]]; then chmod +x st_target1.cmd; fi $ ./st_target1.cmd
Tip
You might want to check how to run SSH Monitor as a daemon and how to run SSH Monitor with a system service for more reliable ways to run SSH Monitor in production.