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

Compare with Current View Page History

« Previous Version 11 Next »

UNDER CONSTRUCTION!

Table of Contents

Overview

  • iocConsole is a tool that creates a persistent console session into an IOC, EIOC or SIOC which can be shared by multiple users simultaneously. The session can also optionally log to a file: $IOC_DATA/<iocname>/screenlog.0.
  • iocConsole connects to RTEMS or other "hard" IOCs by telnet-ing to the IOC's terminal server port.  iocConsole starts up a soft IOC process, and establishes a console session for that process.
  • iocConsole uses the Linux screen program (http://www.slac.stanford.edu/grp/cd/soft/epics/extensions/iocConsole/screen.1.html) to create and manage the console sessions and logging.

iocConsole Extensions doc: http://www.slac.stanford.edu/grp/cd/soft/epics/extensions/iocConsole/index.html

basic commands

  • Once your IOC is configured in the system (see Configuration below) you can start an iocConsole session like this:
    iocConsole <iocname>
    e.g.
    iocConsole sioc-sys0-al00
  • (snip from the doc referenced above):
    The most important screen commands are:
  • C-a d : Detach the screen session from this terminal (C-a C-d also works).
  • C-a ? : Show all screen commands.
  • C-a * : Show a list of all users attatched to this screen session.
  • C-a [ : Enter copy/scrollback mode (C-a C-[ or C-a <esc> also works). In copy/scrollback mode you can use 'vi' or 'emacs' commands to move around the scrollback history. Some useful scrollback mode commands are:
    o Arrow keys move line by line or column by column.
    o h, j, k, l move line by line or column by column (vi-style).
    o + - move one line up/down.
    o C-u C-d move up/down one half a screen.
    o C-b C-f move up/down a full screen.
    o g moves to the beginning of the scrollback history.
    o % preceded by a number jumps to that percentage of the scrollback.
    o / or ? followed by some characters followed by a return searches forward or backwards for those characters.
    o <esc> exits copy/scrollback mode.


Configuration

screeniocs
To use iocConsole, your IOC must be configured in the system screeniocs file (contact Judy Rock to configure your IOC)
When iocConsole starts up a session, it connects to the IOC using info found in the screeniocs file.

  • screeniocs location :
    $IOC/All/Prod/screeniocs or facet_screeniocs
  • screeniocs contents:
    • RTEMS IOC:
      • ioc name
      • terminal server
      • port
      • screen host
    • Soft IOC
      • ioc name
      • executable
      • screen host

screen logging

  • default screen logging parameters are found in the $IOC/Prod/All/screenrc file
    • to override defaults, copy screenrc into your own ioc's $IOC/<iocname> directory and edit it
    • for example, to turn off screen logging, in your own local copy comment out the "deflog on" line: "#deflog on"

Troubleshooting


Maintenance and monitoring

A nightly cron job running the screenlogd.bash script handles screenlog.0 file cleanup, and maintenance of screen logging iocConsole sessions:

  • manages screenlog backups*
    • screenlog.0 files larger than 1MB are cycled into a series of backup copies, with timestamp extensions. 5 backup copies are kept, with the oldest deleted first. If you would like to keep more than 5 copies, please copy them to another directory.
  • manages iocConsole sessions to maintain screenlogging*
    • "hard" IOCs
      • if a hard IOC's iocConsole screen session is found to be absent, screenlogd.bash attempts to restart an iocConsole session. If the restart fails, screenlogd.bash tries to reset the IOC's terminal server port using iocTSmgr, and then retries establishing an iocConsole screen session.
    • "soft" IOCs
      • screenlogd.bash does NOT restart iocConsole screen sessions for soft IOCs, since this will restart the IOC in production.
      • screenlogd.bash does report soft IOCs that are missing screenlog.0 files.
      • to re-establish logging for a soft IOC missing screenlog.0:
        • iocConsole to the soft IOC
        • in the IOC's console session:
          ctrl-H to stop screen logging
          ctrl-H again to restart screen logging
          ctrl-a d to exit from the iocConsole session

  • No labels