MWD
Section: MidWay Users Manual (8)
Updated: DATE
Index
Return to Main Contents
NAME
mwd - The MidWay daemon
SYNOPSIS
mwd
[-l debuglevel] [-c maxclients] [-C maxconversations]
[-s maxservers] [-S maxservices]
[-b bufferbasesize] [-B heapsize]
[-i ipckey] [-H runtimediretory] [-g maxgateways] [-D]
[instancename]
DESCRIPTION
The MidWay daemon is the arbitrator of a MidWay instance. It allocates the needed IPC resources, and
handles all dynamic changes to the running instance. When a server starts or a client
want to connect it self to the instance, they must ask mwd to do so at their behalf.
On startup it creates as needed the directory structure (see FILES below).
the daemon processes that handles gateways (neigbours) and networked clients
will be childs or threads of mwd.
Note that the max numbers, buffer basesize, and heap size are used by mwd at startup to
calculate the shared memory segment sizes. Since shm segments can't be dynamically resized
(see shmget(2)) these values are not dynamic and can't be changed without taking the MidWay
instance down, thus stopping mwd. In future versions of MidWay we may introduce a regime of
dynamically replacing shared memory segments, but for now you need to have a thougth of how much
you need.
OPTIONS
- -l debuglevel
-
Indicate the verbosity mwd shall log into the log file. Default is 4.
MWLOG_INFO,
but it can also be used to set a lower log level, see
mwlog(3C).
May also be dynamically set via
mwadm(1)
(NYI).
- -c maxclients
-
Sets the maximum number of processes (PIDs) that may attach the instance as a client. Default is 100.
- -C maxconversations
-
Sets the maximum conversations that may be established at a given time. Note that if you have
available conversational servers thru a gateway, they use table entries here as well.
Default is 20.
- -s maxservers
-
The maximum numbers of processes (PIDs) that may attach the MidWay instance as servers. Note remote tervers available thru gateways are
not
included here. Default 50.
- -S maxservices
-
The maximum number or provided services on the instance. If two servers provide the same service
it is counted as 2. However servers in a remote instance are counted as one, or rather per gateway.
Default 100.
- -b basebuffersize
-
The smallest buffer size. mwd will divide the heap (a seperate shared memory segment) info 6 bins.
The bins are holding buffers of size 1, 2, 4, 6, 8, and 16 times the basebuffersize.
The number of buffers per bin is given by the heap size, and all the same number except for
1 * basebuffersize which is twice the number.
For buffers bigger than 16 * basebuffersize stable storeage is used (NYI, 16 * b is currently max).
Default is 1024 bytes.
This approach of using bins are modeled on GNU malloc.
- -B heapsize
-
The size of the heap, currently not used. The number of buffers per bin is given by
(maxclients + maxservers + maxgateways) * 2.
- -A url
-
The url needed for clients and servers to find the primary shared
memory segment. If absent we use
ipc://uid
- -H runtimedirectory
-
See
FILES
below. The directory where MidWay code expect to find config files, and places log and
other runtime files. NOTE if you set this, you
must
set the environment variable MWDIR for IPC clients and servers.
Default is
~/MidWay,
but will use
~/.MidWay
if it exists, and
~/MidWay
do not. (I may swap this order in the future.) mwd will honor the environment variable MWDIR as well.
- -g maxgateways
-
The max number of remote MidWay instances we may know about.
- instancename
-
In order for one user to have more than one MidWay instance running each must at least have
their own IPC key. Without gateways defined neither must have a name set, and are thus being
anonymous. However, if gateways are defined mwd will announce itself as
username@hostname(.ipdomainname).
It is completly legal to have instances with the same name, but confusion will follow.
More importanly, in order to avoid collision of the log files and keep config files separate,
the files are placed under
$MWDIR/instancename/.
See FILES below. In this context the default value is "default". If you use the config file
to generate the IPCKEY, you must of course set the instancename inorder to start to seperate
instances.
ENVIRONMENT
- MWDIR
-
The runtime directory, may be overidden with the -H option.
- MWURL
-
The url, may be overridden with the -A option.
FILES
As discussed above the files are located under
MWDIR/instancename
where the defaults are
MWDIR
= "~/MidWay" and
instancemname
= "default". Under this directory we have the following files and subdirectories:
- MWDIR/instancename/bin
-
For servers run by mwd, the default place mwd will look for them is here. If you give relative path
in mwd.conf for these, thay are relative to tis place.
- MWDIR/instancename/conf
-
Directory for config files. If your servers need their own config files you may place them here, but
all files beginning with mw or .mw are reserved.
- MWDIR/instancename/conf/mwd.conf
-
The config file for mwd, (NYI). See
mwd.conf(4).
- MWDIR/instancename/core
-
If servers run by mwd core dumps, their core files are moved here, and renamed
core.serverexecutablename.YYYYMMDD.
- MWDIR/instancename/logs
-
The default directory for placing logfiles, see
mwlog(3C).
- MWDIR/instancename/logs/MidWayLog.YYYYMMDD
-
The default logfile. See
mwlog(3C).
- MWDIR/instancename/run
-
For servers runned by mwd, default current working directory is set to here before their are started.
- MWDIR/instancename/tmp
-
Runtime data, purged by mwd on startup. Unix family sockets for conversations go here, as well as
large buffers.
SEE ALSO
MidWay(7),mwadm(1),mwserver(1),mwd.conf(4)
WARNINGS
Not matter what is said above, if you are running two or more instances with the same userid,
always
set
instancename
on the instances that are not the default.
Future versions may be POSIX.4 IPC enabled, whenever implementations get into main stream.
When that happen IPC keys become IPC paths.
BUGS
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- ENVIRONMENT
-
- FILES
-
- SEE ALSO
-
- WARNINGS
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 11:18:49 GMT, October 24, 2000