EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Running epics in background in linux
From: "Brian McAllister" <[email protected]>
To: Rok Sabjan <[email protected]>
Cc: [email protected]
Date: Sat, 10 Jan 2004 16:19:33 -0500
>>> On 1/10/2004 at 14:37:45 +0100, Rok Sabjan wrote:

  > I have an interesting question. How to run EPICS application on a linux
  > box in a background. The box is actually contains a strong-arm
  > processor with all the data (+EPICS) stored in the flash. I would like
  > to get EPICS started as soon as I turn on the machine. But if I write a
  > script and put it into /etc/init.d/S99epics, the application starts and
  > then immediately ends.

Look at the "screen" utility.  It comes with Redhat Linux, and probably
most flavors.   If you don't have it, it should be easy to find on the
net.

The command we are using is

    screen -d -m <ioc executable> <ioc startup file>

This starts screen, with EPICS running, then detaches from the terminal.
Later, you can re-attach (from the same tty, or any other) with

    screen -r

All output from the IOC while detached will be captured and can be reviewed
when you re-attach.

---------
NAME
       screen - screen manager with VT100/ANSI terminal emulation
       
SYNOPSIS
       screen [ -options ] [ cmd [ args ] ]
       screen -r [[pid.]tty[.host]]
       screen -r sessionowner/[[pid.]tty[.host]]

DESCRIPTION
       Screen is a full-screen window manager that multiplexes  a
       physical  terminal  between  several  processes (typically
       interactive shells).
       [ .... ]
       There is a scroll-back history buffer for each virtual
       terminal and a copy- and-paste mechanism that allows
       moving text regions between windows.

       When  screen  is called, it creates a single window with a
       shell in it (or the specified command) and then  gets  out
       of  your  way  so that you can use the program as you nor-
       mally would.  Then, at any time, you can create new (full-
       screen)  windows  with  other  programs in them (including
       more shells), kill existing windows, view a list  of  win-
       dows,  turn output logging on and off, copy-and-paste text
       between  windows,  view  the  scrollback  history,  switch
       between windows in whatever manner you wish, etc. All win-
       dows run their programs  completely  independent  of  each
       other.  Programs continue to run when their window is cur-
       rently not visible and even when the whole screen  session
       is detached from the user's terminal.
       [....]

----
Brian McAllister                    Controls Programmer/Beam Physicist
[email protected]                        MIT-Bates Linear Accelerator
(617) 253-9537                                           Middleton, MA

References:
Running epics in background in linux Rok Sabjan

Navigate by Date:
Prev: Running epics in background in linux Rok Sabjan
Next: RE: Problem linking a Channel Access application on Windows using Visual Studio Steven . Banks
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Running epics in background in linux Rok Sabjan
Next: Re: Running epics in background in linux Eric Williams
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·