How to run SSH Monitor

6. How to run SSH Monitor#

Prerequisites:

Once the prerequisites have been followed, you can run SSH Monitor like so:

  1. Change directory to the ioc* folder of the iocBoot directory of your Top, e.g.:

    $ cd /path/to/myTargetMonitoringTop/iocBoot/iocMyTargetMonitoring
    
  2. 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 .cmd explanations.

  3. If running multiple IOC programs in parallel on the same machine, then make sure that each IOC program defines a unique EPICS_CAS_SERVER_PORT with the epicsEnvSet IOC Shell command. You can refer to the syntax used in the .cmd and .substitutions how-to (detailed in the .cmd explanations). 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")
    
  4. 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.