Versions Compared

Key

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

...

  1. Log into lcls-dev3  (ssh <user_name>@lcls-dev3)

  2. Create an Epics Application ($EPICS_IOC_TOP)

    1. Need to cross-compile for target architecture

    2. Check st.cmd file for all vioc’s - verify that it calls rtPriortiesSetup.cmd, which sets the real-time priority for threads
  3. Set-up Directory Structure for cpu’s/vioc’s  under $IOC_DATA
    1. Generate cpu-##-## directory (In this directory, screenlog.0 is generated automatically)
    2. Generate a vioc-##-## directory for each vioc running on this machine
      1. Under each vioc directory, create an autosave, autosave-req, and iocInfo directory
      2. screenlog.0 is generated automatically

  4.   Set-up Directory Structure for cpu’s/vioc’s under $IOC
    1. Generate cpu-##-## directory
      1. Generate a symbolic link named “startup.cmd” that points to “../skel/startup_cpu.cmd”
      2. Generate a kernel-modules.cmdfile that is specific for your cpu

    2.  Generate a vioc-##-## directory for each vioc running on this machine
      1.  Generate a screenrcfile that is name-specific for each vioc
      2. Generate a symbolic link named “startup.cmd” that points to “../skel/startup_vioc.cmd”
      3.  Generate a symbolic link called “iocSpecificRelease” that follows the CRAM convention for pointing to an Epics application
        How to CRAM your Epics Application:

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

How to CRAM your Epics Application: 

https://slacspace.slac.stanford.edu/sites/controls/sections/software/Shared%20Documents/EPICS/Multi%20Site%20Builds/cram_migration_doc.pdf

How to commit screeniocs back into CVS:

  • cvs status <file_name>
  • cvs commit <file_name>

From the command line, start a linuxRT Epics Application manually (must run on a linuxRT machine)

  • ssh

...

  • laci@cpu-b34-fb01

...

  • cd to to the epics application directory structure and run the st.cmd for a linuxRT application

...

  • ./st.cmd   (first line of st.cmd must have !# for this to execute epics application

...

  • binary  ex: !# ../../bin/linuxRT_glibc-x86_64/fastFeedback)

How to boot-up in the foreground versus background:  

The following scripts are located under the directory $IOC/common> (1)

  1.  In the foreground w/screens 
    • linuxRT_viocConsole.sh vioc-b34-fb01

...

  1. In the background w/screens
    •  linuxRT_startup_vioc.sh vioc-b34-fb01

...

  1. In the foreground without screens
    • linuxRT_startupConsole.sh vioc-b34-fb01

If using the screen program:

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

Common Linux Commands Used

  • mkdir <directory_for_cpu/vioc>
  • ln -s <path_to_desired_file> <symbolic_link_name>
  • rm <symbolic_link_name>   (WARNING: Make sure you are not removing the entire directory.  rm <symbolic_link_name/> will remove the directory that the symbolic link points too)
  • grep -r <search_term> .    (recursively search through directories starting in your currently working directory)
  • man <linux_command>  (linux documentation)

 

LinuxRT startup scripts

[cpu]/startup.cmd

A link to skel/startup_cpu.cmd or a real file.

Calls $IOC/common/linuxRT_startup_cpu.sh to set up environment & hardware.

If using a real file, optionally create a list of screenrc VIOCs to start up

If using a real file, optionally create a list of the executables to start them with

Calls $IOC/common/linuxRT_cpu_load_viocs to start the listed VIOCs or extract the list from screeniocs

[cpu]/kernel-modules.cmd

Called by $IOC/common/linuxRT_startup_cpu.sh to load kernel modules.

Custom for each CPU. May contain other related commands.

$IOC/common/linuxRT_startup_cpu.sh

Load environment

mount nfs dir

load kernel modules with [cpu]/kernel-modules.cmd

start CA repeater

$IOC/common/linuxRT_cpu_load_viocs.sh

If a list of IOCs to start up is defined as an environment variable, use it. Otherwise use screeniocs.

if there is a list of executables in an environment variable to go with the list of IOCs, use it.

For each ioc, call linuxRT_startup_vioc.sh iocDirName epicsApp  

$IOC/common/linuxRT_startup_ioc.sh iocName [epicsApp]

Set ulimits

set umask

cd to the vioc directory

If the exececutable name was passed as the second argument, use that.

Otherwise, check screeniocs to determine the epicsApp.

Otherwise look for a #! at the top of ioc/startup.cmd to determine the epicsApp.

Otherwise look for a #! at the top of ioc/iocSpecificRelease/iocBoot/[iocName]/st.cmd to determine the epicsApp.

run startup.cmd using screen and epicsApp


Additional References:

https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=181538610

How to CRAM your Epics Application:

https://slacspace.slac.stanford.edu/sites/controls/sections/software/Shared%20Documents/EPICS/Multi%20Site%20Builds/cram_migration_doc.pdf

...

  • LinuxRT Startup Scripts (in progress)