table of contents
PROCSERV(1) | procServ Manual | PROCSERV(1) |
NAME¶
procServ - Process Server with Telnet Console and Log AccessSYNOPSIS¶
procServ [OPTIONS] port command args...DESCRIPTION¶
procServ(1) creates a run time environment for a command (e.g. a soft IOC). It forks a server run as a daemon into the background, which creates a child process running command with all remaining args from the command line. The server provides console access (stdin/stdout) to the child process by offering a telnet connection at the specified port. For security reasons, by default access is restricted to connections from localhost (127.0.0.1), so that logging into a valid account on the host machine is required.OPTIONS¶
--allowAllow control connections from anywhere.
(Default: restrict control access to localhost.) Creates a serious security
hole, as telnet clients from anywhere can connect to the child’s
stdin/stdout and execute arbitrary commands on the host, if the child permits.
Needs to be enabled at compile-time (see Makefile). Please do not enable and
use this option unless you exactly know why and what you are doing.
--autorestartcmd=char
Toggle auto restart flag when char is
sent on an access connection. Use ^ to specify a control character,
"" to disable. Default is ^T.
--coresize=size
Set the maximum size of core file. See
getrlimit(2) documentation for details. Setting size to 0 will keep
child from creating core files.
-c, --chdir=dir
Change directory to dir before starting
child. This is done each time the child is started to make sure symbolic links
are resolved on child restart.
-d, --debug
Enter debug mode. Debug mode will keep the
server process in the foreground and enables diagnostic messages that will be
sent to the controlling terminal.
-e, --exec=file
Run file as executable for child.
Default is command.
-f, --foreground
Keep the server process in the foreground and
connected to the controlling terminal.
-h, --help
Print help message.
--holdoff=n
Wait at least n seconds between child
restart attempts. Default is 15 seconds.
-i, --ignore=chars
Ignore all characters in chars on
access connections. This can be used to shield the child process from input
characters that are potentially dangerous, e.g. ^D and ^C characters that
would shut down a soft IOC. Use ^ to specify control characters, ^^ to specify
a single ^ character.
-k, --killcmd=char
Kill the child process (child will be
restarted automatically by default) when char is sent on an access
connection. Use ^ to specify a control character, "" for no kill
command. Default is ^X.
--killsig=signal
Kill the child using signal when
receiving the kill command. Default is 9 (SIGKILL).
-l, --logport=port
Provide read-only access to the child’s
console on port. By default all hosts can connect to port, use
the -r ( --restrict) option to restrict access to
localhost.
-L, --logfile=file
Write a console log of all in- and output to
file.
--logstamp[=fmt]
Prefix lines in logs with a time stamp,
setting the time stamp format string to fmt. Default is
"[<timefmt>] ". (See --timefmt option.)
-n, --name=title
In all server messages, use title
instead of the full command line to increase readability.
--noautorestart
Do not automatically restart child process on
exit.
-p, --pidfile=file
Write the PID of the server process into
file to facilitate integration into regular system service
administration mechanisms.
--timefmt=fmt
Set the format string used to print time
stamps to fmt. Default is "%c". (See strftime(3)
documentation for details.)
-q, --quiet
Do not write informational output (server).
Avoids cluttering the screen when run as part of a system script.
--restrict
Restrict log connections to localhost.
-V, --version
Print program version.
-w, --wait
Do not start the child immediately. Instead,
wait for a telnet connection and a manual start command.
-x, --logoutcmd=char
Log out (close client connection) when
char is sent on an access connection. Use ^ to specify a control
character. Default is empty.
USAGE¶
To start a soft IOC using procServ, change the directory into the IOC’s boot directory. A typical command line would beprocServ -n "My SoftIOC" -i ^D^C 20000 ./st.cmd
telnet localhost 20000
ssh -t user@procservhost telnet localhost 20000
> telnet localhost 20000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. @@@ Welcome to the procServ process server (procServ Version 2.1.0) @@@ Use ^X to kill the child, auto restart is ON, use ^T to toggle auto restart @@@ procServ server PID: 21413 @@@ Startup directory: /projects/ctl/lange/epics/ioc/test314/iocBoot/iocexample @@@ Child "My SoftIOC" started as: ./st.cmd @@@ Child "My SoftIOC" PID: 21414 @@@ procServ server started at: Fri Apr 25 16:43:00 2008 @@@ Child "My SoftIOC" started at: Fri Apr 25 16:43:00 2008 @@@ 0 user(s) and 0 logger(s) connected (plus you)
ENVIRONMENT VARIABLES¶
PROCSERV_PIDSets the file name to write the PID of the
server process into. (See -p option.)
PROCSERV_DEBUG
If set, procServ starts in debug mode. (See
-d option.)
KNOWN PROBLEMS¶
None so far.REPORTING BUGS¶
Report bugs on the procServ Trac at http://sourceforge.net/apps/trac/procserv/ or to the authors.AUTHORS¶
Written by David H. Thompson <thompsondh@ornl.gov> and Ralph Lange <Ralph.Lange@gmx.de>.RESOURCES¶
SourceForge project: http://sourceforge.net/projects/procserv/COPYING¶
All copyrights reserved. Free use of this software is granted under the terms of the GNU General Public License (GPLv3).04/13/2012 | procServ 2.6.0.rc2 |