EPICS Controls 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  2020  2021  2022  2023  2024  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  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Running iocsh in the background
From: John Maclean <[email protected]>
To: "Kevin M. Peterson" <[email protected]>, tech-talk <[email protected]>
Date: Wed, 29 Jan 2003 17:28:44 -0600
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




References:
Running iocsh in the background Kevin M. Peterson

Navigate by Date:
Prev: Problems with "mbufs" on vxWorks Jeff Hill
Next: Re: [Fwd: align CPU Error message????] Leonard J. Reder
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  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Running iocsh in the background Till Straumann
Next: Re: Running iocsh in the background Dirk Zimoch
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  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 ·