Versions Compared

Key

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

 

...

 LinuxRT Initial Set-up of cpu and ioc Directory Structureboot directories:

  • BOLD: refers to files that need to be modified or generated by IOC developer
  • Italics: symbolic link
  • LinuxRT_Diagram  (old)
  1. Create  the $IOC_DATA directory for your cpu and iocs  as follows:
    1. cd $IOC_DATA
    2. mkdir cpu-<area>-<subsystem-prefix><2-digit#>
    3. mkdir  sioc-<area>-<subsystem-prefix><2-digit#>
      1. cd sioc-<area>-<subsystem-prefix><2-digit#>
      2. mkdir autossave autosave-req iocInfor archive restore
  2.  Create the $EPICS_IOCS cpu and ioc boot directories
    1. cd $EPICS_IOCS
    2. mkdir cpu-<area>-<subsystem-prefix><2-digit#>  
      1. cd cpu-<area>-<subsystem-prefix><2-digit#>
      2. Setup relative symbolic links to the common startup script and EPICS version:.
        1. ln -s ../common/st.cmd.linuxRT.cpu startup.cmd
        2. ln -s ../common/bin/<epics base version> epicsSpecificRelease
      3. Generate a kernel-modules.cmd file
        1. for examples click  here.
    3. mkdir  sioc-<area>-<subsystem-prefix><2-digit#>
      1. cd sioc-<area>-<subsystem-prefix><2-digit#>
      2. cp ../template/st.cmd.linuxRT startup.cmd
      3. edit startup.cmd and replace <ioc> with your ioc name.
      4. cp ../template/screenrc and replace <ioc> with your ioc name.
      5. edit screenrc and replace <ioc> with your ioc name.
      6. Please note that if the location of your IOC Application st.cmd file is non-standard then change EPICS_IOC_APP path in startup.cmd
      7. Setup a relative symbolic link to the TOP of the IOC Application release
        1. ln -s ../../iocTop/<app>/<version> iocSpecificRelease
    Edit
    1. Add cpu and IOC to $EPICS_IOCS/
    screeniocs  – please note this
    1. screeniocs   
      1. Please note that the  $EPICS file is a symbolic link, so cd to the appropriate directory and edit this file
    .
      1. add line for

...

# Alias      Terminal Server    Port No.      screen is run     Comments (must start with #)

#-------      -------------  -------   --------------  -----------------------------------------------

      1. cpu
        format:  cpu-<area>-<subsystem-prefix><2-digit #>      <ts>   <ts port #t>   <screen  host>   [ # comment]
      2. add line for each ioc
        format:  sioc-<area>-<subsystem prefix><2-digit #>  cpu-<area>-<subsystem-prefix><2-digit #>    <account>   [ # comment]
      3. The "comment" field in screeeniocsis optional and must be precede but  "#".
  1. To reboot linuxRT ioc from a Linux client type the following:: "viocRestart -v <ioc>" RT IOC Applications:

    1. Create script <app>
      1. ex) Hostname   
  2. Generate cpu-##-## directory
  3. Make a symbolic link named “startup.cmd” that points to “../skel/startup_cpu.cmd”
  4. Create a kernel-modules.cmdfile that is specific for your cpu
  5. Make a symbolic link for each vioc(s) hosted on the cpu (ln -s ../vioc-xx##-xx## vioc-xx##-xx##)
     Create a vioc-##-## directory for each vioc running on this machine
  6.  Create a screenrcfile that is name-specific for each vioc
  7.  Make a symbolic link named “startup.cmd” that points to “../skel/startup_vioc.cmd”
  8.  Make a symbolic link called “iocSpecificRelease” that follows the CRAM convention for pointing to an Epics application
    How to CRAM your Epics Application:
  9. Update $IOC/All/Dev screeniocs

    1. Update information pertaining to which vioc’s are running on a cpu and currently the application each vioc is running

    2. Commit screeniocs back into CVS
  10. RT IOC Applications:Create a
    1. /iocBoot/<ioc>/rtPriortiesSetup.cmd 
    file
    1. to set real-time priorities for threads
    2. Load rtPriortiesSetup.cmd
    file
    1. from <app>/iocBoot/<ioc>/st.cmd 

LinuxRT Upgrade IOC Application release:

How to commit screeniocs back into CVS:

...

From the command line, start a linuxRT Epics Application manually (must run on a linuxRT machine)-to start your linuxRT EPICS Application manually from Linux command line:

  • ssh laci@cpu-b34-fb01
  • cd to to the epics application directory structure and run the st.cmd for a linuxRT application<app>/iocBoot/<ioc>
  • ./st.cmd   (cmd     – first line of st.cmd must have !# for this to execute epics application binary  ex: !# ../../bin/linuxRT_glibc-x86_64/fastFeedback)<exe>

How-to boot -up in the foreground versus backgrounda linuxRT ioc from the <cpu>:  

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

  1.  In the foreground w/screens 
    • linuxRT_viocConsole.sh vioc-b34-fb01sh  <ioc>
  2. In the background w/screens
    •  linuxRT_startup_vioc.sh vioc-b34-fb01<ioc>
  3. In the foreground without screens
    • linuxRT_startupConsole.sh
    vioc-b34-fb01

Development Mode:

    • <ioc>

How-to use If you're going to be frequently changing what viocs start automatically and don't want to keep changing the screeniocs file, you can define $LOCAL_IOCS in your kernel-modules.cmd file to override what's in screeniocs. Examples:
export LOCAL_IOCS=( vioc-abc-123 vioc-456-def vioc-789-ghi )
or to start nothing
export LOCAL_IOCS=(  )
Don't do this with stable production systems. It's there to give you flexibility during development without changing screeniocs all the time.
If using the screen program:

  • ctrl a d : detach from the screen session
  • ctrl a { a [ : scroll up through the start-up messages.
  • View all vioc's on host host  cpu:
    • logged in as laci  or flaci for FACET iocs
    • screen -
    ls
    • ls  
  • Attach to vioc: screen -r <vioc_name><ioc>
  • Attaching to a linuxRT screen session multiple times with  "laci"  concurrently:  (Note: from FACET use flaci)
    screen  -x <vioc_name><ioc>
  • Note: The "screen" program supports multi-display mode. When you attach an existing screen session, you can use "-x". It allows an user to attach to "a not detached screen session." The -r option allows a user to attach to a "detached screen session".

...

If you're going to be frequently changing what viocs start automatically and don't want to keep changing the screeniocs file, you can define $LOCAL_IOCS in your kernel-modules.cmd file to override what's in screeniocs.

...


Common Linux Commands Used

...

Additional References:

...