g+ Communities
Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  Index 2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014 
<== Date ==> <== Thread ==>

Subject: procServ (soft IOC server) developments
From: Ralph Lange <Ralph.Lange@bessy.de>
To: Dave Thompson <thompsondh@ornl.gov>
Cc: EPICS Core Talk <core-talk@aps.anl.gov>
Date: Tue, 08 Apr 2008 18:49:45 +0200
Hi Dave,                 (hello core-fellows,)

I have been working on your procServ application to add a bunch of features that we needed, mainly to get it running smoothly under conserver. I'm attaching the description part of the one-file html documentation I am currently writing and a snippet of how a control connection to a procServ running the example IOC looks like (including a ^X reboot).

Is there anything you would like me to add in terms of functionality or configuration options? (The changes are compatible to the original version, all environment variables and redirecting the output still work.)

I will try to get this running on win32-x86-cygwin, so that we can hopefully integrate the increasing number of Windows based IOCs in a similar way, but I'm not a Windows person, so I might have to ask for help if this doesn't work out of the box.

Any ideas? Suggestions?


ps. How should we integrate the changes? Should I send you the new version when it is finished? Should we make it an "official" extension and host it in the APS repository? Or somewhere else?

mare: .../epics/procServ > telnet localhost 20000
Connected to localhost.
Escape character is '^]'.
@@@ Welcome to the procServ process server (procServ Version 2.0.0)
@@@ Use ^X to kill (and restart) the child.
@@@ procServ server PID: 14971
@@@ Startup directory: /net/csr/srv/projects/ctl/lange/epics/ioc/test314/iocBoot/iocexample
@@@ Child "SoftIOC Example" started as: ./st.cmd
@@@ Child "SoftIOC Example" PID: 14972
@@@ procServ server started at: Tue Apr  8 18:46:15 2008
@@@ Child "SoftIOC Example" started at: Tue Apr  8 18:46:16 2008
@@@ 0 user(s) and 0 logger(s) connected (plus you)
@@@ @@@ @@@ @@@ @@@
@@@ Received a sigChild for process 14972. The process was killed by signal 9
@@@ Current time: Tue Apr  8 18:46:37 2008
@@@ Child process is shutting down, a new one will be restarted shortly
@@@ Restarting child "SoftIOC Example"
@@@    (as ./st.cmd)
@@@ The PID of new child "SoftIOC Example" is: 14995
@@@ @@@ @@@ @@@ @@@
## You may have to change example to something else
## everywhere it appears in this file
< envPaths
cd /net/csr/srv/projects/ctl/lange/epics/ioc/test314
## Register all support components

Title: procServ Documentation

procServ - Process Server with Telnet Console and Log Access


procServ [-d|--debug] [-h|--help] [-r|--restrict] [-i|--ignore chars] [-k|--kill char] [-l|--logport port] [-L|--logfile file] [-n|--name title] [-p|--pidfile file] port command args ...


procServ creates a run time environment for a command (e.g. a soft IOC). It forks a daemon into the background, that creates a child process running command with all remaining args from the command line. procServ provides console access (stdin/stdout) to the child process by offering a telnet connection at the specified port. For security reasons, access is restricted to connections from localhost (, so that logging into a valid account on the host machine is required.

procServ can be configured to write a console log of all in- and output of the child process into a file using the -L (--logfile) option. To facilitate running procServ under a central console access management (like conserver), the -l (--logport) option creates an additional telnet port, which is by default public (i.e. not restricted to localhost), and provides read-only log access to the child's console. The -r (--restrict) option restricts the log port to localhost, similar to the access port.

Both access and log ports allow multiple connections, which are handled transparently: all input from access connections is forwarded to the child process, all output from the child is forwarded to all access and log connections (and written to the log file). All diagnostic messages from procServ itself start with "@@@ " to be clearly distinguished from child process messages.

The procServ daemon process will automatically respawn a child process that dies. To avoid spinning, procServ honours a minimum time between child process restarts (default: 15 seconds, can be changed at compile time). To allow restarting the child by sending a SIGKILL signal to the child process, a kill command character (default: ^X) can be configured using the -k (--kill) option. To block input characters that are potentially dangerous to the child (e.g. ^D and ^C on soft IOCs), the -i (--ignore) option can be used to specify characters that are silently ignored when coming from a console access port.

To facilitate being started and stopped as a standard system service, the -p (--pidfile) option tells procServ to create a standard PID file containing the daemon process PID.

The -d (--debug) option runs procServ in debug mode: the daemon process stays in the foreground, printing all regular log content plus additional debug messages to stdout.


-d | --debug
Debug mode.

Navigate by Date:
Prev: Re: CVS Access from SLAC Andrew Johnson
Next: Problems with bug in make 3.81 Ralph Lange
Index: 2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014 
Navigate by Thread:
Prev: Re: CVS Access from SLAC Andrew Johnson
Next: Problems with bug in make 3.81 Ralph Lange
Index: 2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·