Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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.

                                       Table 1

FacilityAccountServer
LCLSlacilcls-daemon0, lcls-daemon1, lcls-deamon2,cryo-daemon1
FACET-IIflacifacet-daemon1
TestFacacctftestfac-daemon1
Devlacilcls-dev3 (rhel6), dev-rhel7 (rhel7)


Production:   lcls, lcls2, facet, testfac

  1. Send email to Ken Brobeck requesting:
      create controls infrastructure for a new IOC on facility production server, which includes the following:
      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:
    1. $IOC_DATA/<ioc>  directory
          1. $EPICS_IOCS<ioc>
          2.  Add data directories: $IOC_DATA/<ioc>/<autosave,autosave-req,restore,iocInfo,
    2. archive> 
          1. archive,yaml>  directories 
          2.  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>
    3.      
    4. Proceed to Step #2c under Development

                                                            

    ...

    ...

    Development:   dev

    1. Create the $IOC_DATA directory
    FacilityServer
    LCLSlaci@lcls-daemon1
    LCLS-IIlaci@lcls-daemon1
    FACET-IIflaci@facet-daemon1
    TestFacacctf@testfac-daemon1

    ...

    Development:    dev

    1. Create the $IOC_DATA directory for your iocs as follows:
      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.  Create the $EPICS_IOCS  ioc boot directory
      1. mkdir  sioc-<area>-<subsystem-prefix><2-digit#>
      Setup ioc boot directory filesCreate the IOC boot directory with boot links as follows:
      1. cd $EPICS_IOCS
      2. mkdir  / sioc-<area>-<subsystem-prefix><2-digit#>
      copy the ioc startup.cmd script from  $EPICS_IOCS/template
      1. cd <ioc>
        1.  cp
       for Linux running iocsh:    cp
        1. ../template/startup.cmd.
      soft         st.cmd Create symbolic link:         ln -s st.cmd
        1. soft  startup.cmd
        2. Edit 
      st
        1. 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

          1. if your IOC Application uses a non-standard location for the st.cmd file,  change path
        of the EPICS
          1. of  EPICS_IOC_APP
        Setup a relative symbolic link that points to the EPICS IOC Applicaiton TOP as follows
        1. create symbolic:  
         
                
        1. ln -
        s
        1. s   ../../iocTop/<app>/
        <version>
        1. <ver>  iocSpecificRelease
      Modify
    3. Add your IOC to$EPICS_IOCS/
    4. screeniocs    Please note that this is a symbolic link to a CVS file.
      verify that the file in use has not been modified without being committed.cd $EPICS_IOCS/All/<facility>      , where
    5. facility
    6. is Dev,Prod,facet,acctest
    7. cvs diff -r HEAD screeniocs
    8. 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.
    9. check out screeniocs from CVS into your work area
    10. cd
    11. cd <work>
      cvs co epics/iocCommon/All
    12. /
    13. <facility>   , where facility is Dev,Prod,facet,acctestcd epics/iocCommon/All/<facility>/
    14. screeniocs
    15. edit screeniocs
    16. 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}
    17. The "comment" field in  screeeniocs  is optional
    18. and
    19. must be preceded by a  "#".
    20. add comment in the "Mod:" section of the header
    21. commit your changes of screeniocs to CVS  as follows:
      1.  cvs commit  -m "added cpu and ioc blah" screeniocs
    22. update the screeniocs file in use
      1. cd $EPICS_IOCS/All/<facility>
      2.  rm -f screeniocs
      3. cvs update screeniocs
         
    23. commit change to CVS 

    How-to boot an IOC from the Linux host(daemon) server specified in screeniocs:

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

    1. Log onto server listed in table 1 above Table 1 from the account this same table,  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. siocRestart <ioc>
    4. Boot ioc IOC from the facility home network display 

    ...

    1. display network panel 


    How to connect to Linux IOC from a Linux server:

    1. iocConsole  <ioc>

    How-to use screen program:

    ...