1DC_SERVER(1)                       distcache                      DC_SERVER(1)
2
3
4

NAME

6       dc_server - Distributed session cache server
7

SYNOPSIS

9       dc_server -listen <address> [options]
10

DESCRIPTION

12       dc_server runs a cache server and starts listening on a configurable
13       network address for connections. Incoming connections are expected to
14       communicate using the distcache(8) protocol, and would typically be
15       instances of dc_client(1) running on other machines.
16

OPTIONS

18       -daemon
19           After initialising, dc_server will detach from the parent process,
20           close standard file-descriptors, etc. If this flag is not set,
21           dc_server will run in the foreground. It is recommended to use this
22           flag in combination with the pidfile flag to simplify stopping and
23           restarting services.
24
25       -user user
26           This switch will attempt to change user privileges of dc_server to
27           the given user ID after initialising its listening socket. On most
28           systems, this can only work if dc_server is started as the root
29           user. It is important to note that the change of user ID occurs
30           after the listening socket is create. This ensures that the listen‐
31           ing socket is created with the most restrictive permissions, and
32           that the ability to connect to servers at run-time corresponds to
33           the given user (rather than having unusual root permissions on
34           startup).
35
36       -listen address
37           Configures the address on which dc_server should listen for incom‐
38           ing connections.  The syntax is that defined by the libnal API.
39           Some examples follow;
40
41               # Listen on port 9001 for all TCP/IPv4 interfaces
42               dc_server -listen IP:9001
43
44               # Listen on port 9001 on a specific TCP/IPv4 interface
45               dc_server -listen IP:192.168.0.1:9001
46               dc_server -listen IP:cacheserver.localnet:9001
47
48               # Listen on a unix domain socket in the /tmp directory
49               dc_server -listen UNIX:/tmp/cacheserver
50
51       -sockowner user
52           This switch is only useful when listening (see -listen) on unix
53           domain sockets.  It will attempt to change ownership of the created
54           socket file.
55
56       -sockgroup group
57           This switch is only useful when listening (see -listen) on unix
58           domain sockets.  It will attempt to change group ownership of the
59           created socket file.
60
61       -sockperms perms
62           This switch is only useful when listening (see -listen) on unix
63           domain sockets.  It will attempt to change file permissions for the
64           created socket file, and is specified in the standard octal nota‐
65           tion used for unix file permissions. Eg. to start dc_server to run
66           as the nobody user, listening on a unix domain socket that can only
67           be connected to by the root user or members of the dcclient group;
68
69               # dc_server -listen UNIX:/tmp/cacheserver -user nobody \
70                     -sockgroup dcclient -sockperms 440
71
72       -sessions num
73           Specifies a maximum number of sessions that should be stored in the
74           cache. All sessions in a cache have an expiry time so that they
75           will, if they have not been forcibly removed before that time, be
76           expired out of the cache. If it is desirable to allow long session
77           timeouts under normal situations yet protect against the session
78           cache growing without limit periods of high-load, this limit can
79           provide the required balance. If the session cache reaches this
80           limit, it will automatically rotate out those sessions in the cache
81           that are due to expire soonest. It is not (yet) possible to have no
82           limit at all, though a future version should support this by allow‐
83           ing the user to specify zero.
84
85           The default value for this flag is 512.
86
87       -progress num
88           dc_server will, by default, log a line of output to stdout whenever
89           there is cache activity, but will make sure to do so no more often
90           than once a second.  If -progress is specified, this will take
91           precedence  so that output will be emitted whenever num operations
92           have occurred since the last output, irrespective of how little
93           time has elapsed. The once-a-second logic remains behind this, so
94           that if less than num operations has taken place but at least one
95           second has passed, output will still be logged. This flag has no
96           effect if -daemon is used.
97
98       -pidfile path
99           This is a standard flag for many programs, and most useful in com‐
100           bination with -daemon. When -pidfile is specified dc_server will
101           write its process ID to a file at the specified path upon success‐
102           ful initialisation. To use this path file to later kill the running
103           dc_server instance, use something like (where pidfile.pid is what‐
104           ever path was);
105
106               kill `cat pidfile.pid`
107
108       -killable
109           The default behaviour of dc_server is to silently ignore SIGUSR1
110           and SIGUSR2 signals, but with this switch enabled it will handle
111           these signals and close down cleanly (mainly useful for developers
112           as an alternative to SIGKILL which is less useful for debugging
113           memory leaks).
114
115       -h, -help, -?
116           Any of these flags will cause dc_server to display a brief usage
117           summary to the console and exit cleanly. Any other flags are
118           ignored.
119

SEE ALSO

121       dc_client(1)
122           Distributed caching client proxy.
123
124       dc_snoop(1)
125           Distcache protocol analyser and debugging tool.
126
127       distcache(8)
128           Overview of the distcache architecture.
129
130       http://www.distcache.org/
131           Distcache home page.
132

AUTHOR

134       This toolkit was designed and implemented by Geoff Thorpe for Crypto‐
135       graphic Appliances Incorporated. Since the project was released into
136       open source, it has a home page and a project environment where devel‐
137       opment, mailing lists, and releases are organised. For problems with
138       the software or this man page please check for new releases at the
139       project web-site below, mail the users mailing list described there, or
140       contact the author at geoff@geoffthorpe.net.
141
142       Home Page: http://www.distcache.org
143
144
145
1461.4.5                             2004.03.23                      DC_SERVER(1)
Impressum