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

Compare with Current View Page History

« Previous Version 16 Next »

For a more comprehensive overview and detailed questions, please refer to the following page:

 LinuxRT Initial Set-up of cpu and vioc Directory Structure:

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

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

  2. Create an Epics Application ($EPICS_IOC_TOP)

    1. Need to cross-compile the Epics Application for the desired 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. Each vioc directory needs a rtPriortiesSetup.cmd
  3. Create and Set-up a  Directory Structure for cpu’s/vioc’s  under $IOC_DATA
    1. Create cpu-##-## directory (In this directory, screenlog.0 is generated automatically)
    2. Create 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.  Create and Set-up Directory Structure for cpu’s/vioc’s under $IOC
    1. Generate cpu-##-## directory
      1. Make a symbolic link named “startup.cmd” that points to “../skel/startup_cpu.cmd”
      2. Create a kernel-modules.cmdfile that is specific for your cpu
      3. Make a symbolic link for each vioc(s) hosted on the cpu (ln -s ../vioc-xx##-xx## vioc-xx##-xx##)

    2.  Create a vioc-##-## directory for each vioc running on this machine
      1.  Create a screenrcfile that is name-specific for each vioc
      2.  Make a symbolic link named “startup.cmd” that points to “../skel/startup_vioc.cmd”
      3.  Make 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 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.  In the foreground w/screens 
    • linuxRT_viocConsole.sh vioc-b34-fb01
  2. In the background w/screens
    •  linuxRT_startup_vioc.sh vioc-b34-fb01
  3. In the foreground without screens
    • linuxRT_startupConsole.sh vioc-b34-fb01

Development Mode:

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 { : scroll up through the start-up messages.
  • View all vioc's on host cpu: screen -ls
  • Attach to vioc: screen -r <vioc_name>
  • Attaching to a linuxRT screen session multiple times with  "laci"  concurrently:
    screen  -x <vioc_name>
  • 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".


Development Mode:

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=(  )

    


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)

Additional References:


  • No labels