Next: OpenVMS
Up: Starting in Background
Previous: Starting in Background
Contents
Index
A multithreaded server has to be started at boot time.
Figure 4.1:
Change to /etc/init.d
|
Here the start scripts for all servers are located. Normally there should be an
example called "skeleton". Copy this file to "your_pvs".
Substitute all occurences of FOO by YOUR_PVS.
These lines should be changed afterwards.
Figure 4.2:
Edit start script
<snip>
YOUR_PVS_BIN=/usr/sbin/YOUR_PVS # change to your path
<snip>
YOUR_PVS_CONFIG=/etc/sysconfig/YOUR_PVS # comment out
test -r $YOUR_PVS_CONFIG || {echo "$YOUR_PVS_CONFIG not existing"; exit 6} # comment out
. $YOUR_PVS_CONFIG # comment out
<snip>
startproc $YOUR_PVS_BIN
# add command line parameters E.g. -port=5050 -sleep=100 -cd=/your/dir
<snip>
|
|
Now you can try YOUR_PVS.
Figure 4.3:
Howto control your multithreaded server
./your_pvs start
./your_pvs status
./your_pvs stop
|
|
In order to automatically boot YOUR_PVS in the correct runlevel
you have to set a link to this file in "rc5.d".
On SuSE Linux this can be done from YaST using the runlevel editor.
Choose your_pvs and simply activate it.
If you want to use inetd or xinetd you have to do the follwing.
Install and activate xinetd.
In /etc/services add a line as follows.
Figure 4.4:
Define a port for inetd
pvsuper 5051/tcp # pvs super server
|
|
This defines a service pvsuper on port 5051.
In /etc/xinetd.d you need the following file.
Figure 4.5:
Create your start script for xinetd
nb3lehrig:/etc/xinetd.d # cat pvsuper
# default: off
# description: pvsuper ProcessViewServer daemon
service pvsuper
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /your/directory/pvsuper
server_args = -port=5051 -cd=/your/directory/
disable = no
}
|
|
Figure 4.6:
Create your start script for inetd in /etc/inetd.conf
pvsuper stream tcp nowait root /usr/sbin/tcpd /your/directory/pvsuper -sleep=200 -cd=/your/directory
|
|
In order to activate your new server you have to restart xinetd or inetd respectively.
Figure 4.7:
Restart xinetd
cd /etc/init.d
./xinetd stop
./xinetd start
|
|
Next: OpenVMS
Up: Starting in Background
Previous: Starting in Background
Contents
Index
Rainer Lehrig
2004-02-17