Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: RE: Running iocsh in the background
From: Kevin Tsubota <ktsubota@keck.hawaii.edu>
To: "'John Maclean'" <jfm@aps.anl.gov>, "Kevin M. Peterson" <kmpeters@anl.gov>, tech-talk <tech-talk@aps.anl.gov>
Date: Wed, 29 Jan 2003 15:57:12 -1000
Wow, this is just what I was going to be looking for shortly.
It tried it and it does the job!

I downloaded a copy for Unix from:

	http://www.math.fu-berlin.de/~guckes/screen/dist.php3



> -----Original Message-----
> From: John Maclean [mailto:jfm@aps.anl.gov]
> Sent: Wednesday, January 29, 2003 1:29 PM
> To: Kevin M. Peterson; tech-talk
> Subject: Re: Running iocsh in the background
> 
> 
> I had this problem and have used the screen program as 
> suggested by Eric 
> Norum.
> 
> "screen" is a unix program that may not be on your system but 
> should be 
> easily available. Our sysadmin people installed it for me 
> very quickly. 
> It allows you to detach the screen from the ioc without 
> killing the ioc. 
> You can of course reattach the screen later.
> 
> screen is a program with many options, just consult the man page! 
> However some commands that I've found useful are:
> 
> (To simplify things I've assumed "myioc" is a script to start 
> the ioc in 
> the usual manner)
> 
> screen myioc     - this will start the ioc attached to a 
> screen. <ctl>a 
> <ctl>d will detach the screen, leaving the ioc running.
> 
> screen -ls     - will list the active screen sessions
> 
> screen -r pid.tty.hostname     - will reattach to the ioc screen.
> 
> ssh -t pid.tty.hostname "screen -R"     - reattaches to a screen on a 
> remote machine (not sure this is the exact syntax for this one)
> 
> screen -d -m myioc     - will start the ioc in detached mode
> 
> <ctl>a d     - detaches screen from ioc
> 
> I've found this to be a really neat tool. It even captures 
> the console 
> output when your screen is detached and you see it when you 
> reattach. I 
> have a couple of test stands running for our power supply group using 
> this technique. There are issues of how you handle multiple 
> iocs on one 
> machine that I haven't had to consider yet. How do you make sure you 
> shut down the correct ioc for example?
> 
> I hope this helps.
> 
> John.
> 
> 
> 
> Kevin M. Peterson wrote:
> > 
> > I have a Linux IOC and I am using the main function from
> > R3.14.1's example App.  After the IOC is initialized iocsh
> > left in "interactive mode" just like the App. Dev. Guide
> > describes.
> > 
> > Unfortunately, "shutting down" the Linux IOC dangerously
> > easy.  It isn't necessary to type the "exit" command; Closing
> > the terminal window or pressing Ctrl-C do the job with even
> > less effort.
> > 
> > Is it possible to start the Linux IOC and have it run in the
> > background?  The Linux IOC seems to be missing the
> > "non-interacting mode" that all of the vxWorks IOCs have.
> > 
> > 
> > Thanks ahead of time,
> > 
> > Kevin Peterson
> > 
> 
> 

Navigate by Date:
Prev: Re: [Fwd: align CPU Error message????] Leonard J. Reder
Next: RE: Building VxWorks Boot Rom on Linux Singleton, SJ (Stephen)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: Running iocsh in the background Rarback, Harvey
Next: Problems with "mbufs" on vxWorks Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019 
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 ·