You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »


Definitions

  • BOLD: refers to files that need to be modified or generated by IOC developer
  • Italics: symbolic link


How-To setup the IOC boot directories

The instructions differ between production and development due to permission restrictions in production.

Production:   lcls, facet, testfac

  1. Send email to Ken Brobeck requesting:
    1. create controls infrastructure:
      • for a new IOC  that boots from a production Linux daemon server (see Table1) or a camera server.
        1.  Add boot directory: $EPICS_DATA/<ioc>
        2.  Add data directories: $IOC_DATA/<ioc>/<autosave,autosave-req,restore,iocInfo,archive,yaml>  directories 
        3.  Add automatic boot scripts:  (rhel6 only) 
          • add boot script on server defined in table 1:       /etc/inti.d/st.<ioc>
          • add symbolic link on server defined in table 1:   /etc/rc3.d/SS98st.<ioc> ---->   /etc/init.d/st.<ioc>
      • for new CPU that will perform a diskless boot of rhel7 (centos7).   
        1. Add boot directory: $EPICS_DATA/<cpu>
        2. Add data directory: $IOC_DATA/<cpu>      - includes iocInfo
  2. Proceed to Step #3 under Development

                                     Table 1

FacilityAccountServer
LCLSlacilcls-daemon0, lcls-daemon1, lcls-deamon2,cryo-daemon1
FACET-IIflacifacet-daemon1
TestFacacctftestfac-daemon1

                    

Development:    dev

  1. Create the $IOC_DATA directory f as follows:
    1. For your IOC
      1. cd $IOC_DATA for your IOC
      2. mkdir sioc-<area>-<subsystem-prefix><2-digit#>
      3. cd  <sioc>
      4. mkdir archive autosave-req autosave iocInfo restore yaml
    2. For your CPU (in needed)
      1. $IOC_DATA
      2. mkdir cpu-<area>-<subsystem-prefix><2-digit#>
      3. cd <cpu>
      4. mkdir iocInfo
  2.  Create the $EPICS_IOCS  boot directory as follows:
    1. For your IOC: mkdir  sioc-<area>-<subsystem-prefix><2-digit#>
    2. for your CPU: mkdir  cpu-<arae>-<subsystem-prefix><2-digit#>
  3. Setup boot directory files
    1. For your IOC:
      1. cd $EPICS_IOCS/<ioc>
        1.  for Linux running iocsh:    cp ../template/startup.cmd.soft         startup.cmd
        2.  for Linux running cexp:     cp ../template/startup.cmd.soft.cexp  startup.cmd
        3. Edit startup.cmd
          1. replace <ioc>  with your ioc name
          2. replace <t_a> with the target, such as  linux-x86  or linux-x86_64 or rhel6-x86_64, rhel7-x86_64    (ref. your application bin directory).
          3. replace <exe> with your IOC Application executable this ioc should load
          4. if your IOC Application uses a non-standard location for the st.cmd file,  change path of  EPICS_IOC_APP
        4. create symbolic:   ln -s   ../../iocTop/<app>/<ver>  iocSpecificRelease
    2. For you CPU (if needed)
      1. cd $EPCS_IOCS/<cpu>
      2. cp ../template/startup.cmd.soft.cpu.<facility> startup.cmd    where facility is dev,lcls,facet,testfac
      3. Edit startup.cmd
        1. replace <cpu> with cpu name
        2. if your IOC Application uses a non-standard locaiton for hte st.cmd file, change the path of EPICS_CPU_APP
      4. create symbolic:   ln -s   ../../iocTop/<app>/<ver>  iocSpecificRelease
      5. Add ipxe file in $TFTPBOOT/boot/ipxe/<cpu>.ipxe   Note: for a FACET cpu you must create this file from laci@lcls-srv01
  4. Modify $EPICS_IOCS/screeniocs    Please note that this is a symbolic link to a CVS file.
    1. Go to your home sandbox:
      1. cd <work>
        cvs co epics/iocCommon/All/<facility>   , where facility is Dev,Prod,facet,acctest
        1. add line for <ioc>. For server refer to table 1 above.
          format:  sioc-<area>-<subsystem prefix><2-digit #>  <executable w/full absoluete path>    sioc   <server>    [#comment}
        2. The "comment" field in  screeeniocs  is optional and must be preceded by a  "#".
        3. add comment in the "Mod:" section of the header
        4. cd epics/iocCommon/All/<facility>/screeniocs
        5. edit screeniocs
    2. verify that the file in production have not been modified without being committed.
      1. cd $EPICS_IOCS/All/<facility>      , where facility is Dev,Prod,facet,acctest
      2. cvs diff -r HEAD screeniocs
      3. if there are issues, then send email to whoever made the change or to controls-software that you are about to update this file and uncommitted edits will be lost, so please commit your changes to CVS.  If you don't get a response,  you can either add the changes to CVS in addition to yours or just add yours.
    3. check out screeniocs from CVS into your work area
    4. commit your changes of screeniocs to CVS  as follows:
      1.  cvs commit  -m "added cpu and ioc blah" screeniocs
    5. update the screeniocs file in use
      1. cd $EPICS_IOCS/All/<facility>
      2.  rm -f screeniocs
      3. cvs update screeniocs
         

How-to boot an IOC from the Linux (daemon) host with disk:

There are multiple ways to boot a soft ioc which are listed below: 

  1. Log onto server listed in table 1 above and perform the following commands:
    1. cd /etc/init.d
    2. ./st.<ioc>  <restart,start,stop>
  2. Use iocConsole to start an ioc, which uses the screen program
    1. iocConsole <ioc>  --stayup
  3. Boot ioc from the facility home network display 


How-to boot an IOC from the Linux host w/o a disk:

The following scripts are located under the directory $IOC/common and should be in PATH on the CPU.

    1. siocStart <ioc>   - starts a specific ioc. However, if the ioc is up nothing will be done
    2. siocStart    -  starts all iocs not already running
    3. iocConsole.sh <ioc> -d   (starts the specified ioc, but does not attache to the screen session)
    4. iocConsole.sh <ioc> -R  (graceful reset)
    5. iocConsole.sh <ioc> -r  (fast restart)
    6. iocConsole.sh --help

How to connect to Linux CPU from a Linux host with a disk:

Use either iocConsole or ssh to CPU as follows:

  1. iocConsole  <cpu>
  2. Using ssh
    • from  lcls or dev: ssh laci@<cpu>  
    • from facet: ssh flaci@<cpu

How to check if IOC is running on the linuxRT CPU:

  • from laci or flaci type:  screen -ls 

How-to use screen program:

  • ctrl a d : detach from the screen session
  • ctrl a [ : scroll up through the start-up messages.

  • No labels