lyskomd.texi 100 KB
Newer Older
David Byers's avatar
David Byers committed
1
\input texinfo
2
@c $Id: lyskomd.texi,v 1.50 2002/10/06 21:31:32 ceder Exp $
David Byers's avatar
David Byers committed
3
4
@c %**start of header
@setfilename lyskomd.info
5
6
@include version.texi
@settitle lyskomd @value{VERSION} Reference Manual
David Byers's avatar
David Byers committed
7
8
9
@setchapternewpage odd
@c %**end of header

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@iftex
@parindent 0pt
@begin tex
\global\def\BB#1{\b{#1}}
\global\def\II#1{\i{#1}}
@end tex
@end iftex

@ifinfo
@macro BB {text}
'\text\'
@end macro
@macro II {text}
/\text\/
@end macro
@end ifinfo

David Byers's avatar
David Byers committed
27
@ifinfo
28
29
This is the reference manual for the lyskomd LysKOM server version
@value{VERSION}.
David Byers's avatar
David Byers committed
30

Per Cederqvist's avatar
Per Cederqvist committed
31
Copyright @copyright{} 1995-2002 Lysator ACS.
David Byers's avatar
David Byers committed
32
33
34
35
36
37
38
39
40
41
42
43
44

Permission is granted to make and distribute verbatim copies of this
specification provided the copyright notice and this permission notice
are preserved on all copies.
@end ifinfo

@dircategory LysKOM
@direntry
* lyskomd: (lyskomd).                lyskomd reference manual.
@end direntry

@titlepage
@sp 10
45
@title lyskomd Reference Manual
David Byers's avatar
David Byers committed
46
@sp 2
47
@subtitle Server version @value{VERSION}
David Byers's avatar
David Byers committed
48
49
50
51
52
@sp 2
@author by the lyskomd developers

@page
@vskip 0pt plus 1filll
Per Cederqvist's avatar
Per Cederqvist committed
53
Copyright @copyright{} 1995-2002 Lysator ACS
David Byers's avatar
David Byers committed
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

Permission is granted to make and distribute verbatim copies of this document
provided the copyright notice and this permission notice are preserved on all
copies.

Modified versions of this document may be redistributed with the added
condition that all modifications not cleared with the LysKOM development group
are clearly marked and that the entire modified work be redistributed under the
same conditions as the original.

Permission is granted to copy and distribute translations of this manual into
another language under the same conditions as for modified versions.

@end titlepage

@ifinfo
70
@node Top
David Byers's avatar
David Byers committed
71
72
73
@top lyskomd

lyskomd is a server for the LysKOM conferencing system. This info file
74
documents version @value{VERSION} of lyskomd.
David Byers's avatar
David Byers committed
75
76
77
78
79
80
81

@menu
* Copying::                     lyskomd is free software.
* Overview::                    Overview of LysKOM.
* Installation::                How to install lyskomd.
* Configuration::               How to configure lyskomd.
* Running lyskomd::             How to run lyskomd.
82
83
* Invoking updateLysKOM::       How to run updateLysKOM.
* Invoking komrunning::         How to run komrunning.
David Byers's avatar
David Byers committed
84
* Administration::              Administering a LysKOM server.
David Byers's avatar
David Byers committed
85
86
* Bugs::                        Known bugs in lyskomd.
* DBCK Reference::              Checking and repairing the database.
87
* splitkomdb::                  How to backup the database.
David Byers's avatar
David Byers committed
88
* Hacking::                     Notes for server developers.
89
* lyskomd Database Specification::  
David Byers's avatar
David Byers committed
90
91
92
93
@end menu

@end ifinfo

94
@node Copying
David Byers's avatar
David Byers committed
95
96
@chapter Copying

97
98
lyskomd is free software. It is distributed under the Gnu General Public
License version 2. The file COPYING in the top level of the distribution
David Byers's avatar
David Byers committed
99
100
101
contains the text of the license.


102
@node Overview
David Byers's avatar
David Byers committed
103
104
105
106
107
108
@chapter Overview

LysKOM is a conferencing system@footnote{Or in modern terms, enabling
technology for Computer-Supported Cooperative Work (CSCW).}. Similar
systems were QZ-KOM and PortaCOM@footnote{Also known as ``PottaKOM'' and
``BortaKOM''.}. The LysKOM system is copyrighted by Lysator Academic
109
110
Computing Society and distributed under conditions of the GNU General Public
License version 2. LysKOM and its documentation is provided ``as is'' without
David Byers's avatar
David Byers committed
111
112
warranty of any kind.

113
114
This reference manual documents version @value{VERSION} of the lyskomd
LysKOM server. The lyskomd server is the work of several people. The main
David Byers's avatar
David Byers committed
115
contributors have been
116
117
118
Per Cederqvist @email{ceder@@lysator.liu.se},
Inge Wallin @email{inge@@lysator.liu.se},
Thomas Bellman @email{bellman@@lysator.liu.se},
119
120
David Byers @email{byers@@lysator.liu.se} and
Peter Eriksson @email{pen@@lysator.liu.se}.
David Byers's avatar
David Byers committed
121
122
123
124
125
126
127
128
129


@section History

In 1990, Per Cederqvist @email{ceder@@lysator.liu.se} and Peter Eriksson
@email{pen@@lysator.liu.se} and a few other persons started to write the
server. It was operational in the summer of 1990, even though the
members of Lysator discovered a thing called MUD. We started using RCS
on 20 May 1991. The first release was made on 16 Sept 1991. Around that
130
time we switched from RCS to CVS to handle our source code.
David Byers's avatar
David Byers committed
131
132
133



134
@node Installation
David Byers's avatar
David Byers committed
135
136
@chapter Installation

137
138
139
140
Instructions for compiling and installing lyskomd are in the files
@file{README} and @file{INSTALL}, located in the top level of the
lyskomd distribution.  Installation should be straightforward on most
platforms.
David Byers's avatar
David Byers committed
141
142


143
@node Configuration
David Byers's avatar
David Byers committed
144
145
146
147
@chapter Configuration

There are two configuration files for lyskomd. One defines the server
options and the other defines aux-item types @ref{(protocol-a)The
148
Aux-Item List,The Aux-Item List}.
David Byers's avatar
David Byers committed
149
150
151
152
153
154
155

@menu
* Server Configuration File::   The server configuration file.
* Aux-Item Definition File::    The aux-item definition file.
@end menu


156
@node Server Configuration File
David Byers's avatar
David Byers committed
157
158
159
@section Server Configuration File

The server reads its configuration from a configuration file. The
160
default configuration file is @file{/usr/lyskom/etc/config}. The
David Byers's avatar
David Byers committed
161
162
163
164
165
location of the configuration file can be changed at run-time by
supplying an argument to lyskomd.

The configuration file is line oriented. Each line consists of a
parameter name followed by a colon, and the value of the parameter.
David Byers's avatar
David Byers committed
166
Empty lines and lines whose first non-blank character is a @samp{#} are
David Byers's avatar
David Byers committed
167
168
169
170
171
172
173
ignored.

@menu
* Parameter Types::             Types of configuration parameters.
* Parameters::                  Valid configuration parameters.
@end menu

174
@node Parameter Types
David Byers's avatar
David Byers committed
175
176
@subsection Parameter Types

177
Every parameter has a type. The standard types are:
David Byers's avatar
David Byers committed
178
179
180
181
182
183
184
185

@table @code
@item bool
The parameter can be true or false. Legal values are @code{on},
@code{true}, @code{yes} and @code{1} for true and @code{off},
@code{false}, @code{no} and @code{0} for false.

@item locale-name
186
The parameter is a locale name. The value must be a legal locale name of
David Byers's avatar
David Byers committed
187
188
189
190
the system where lyskomd is running.

@item path
The parameter is a path name. The value must be a legal path on the
191
system where lyskomd is running. Most paths you can specify can be
192
either absolute paths (if they begin with a @samp{/}) or paths relative
193
194
to the installation prefix which is specified at compile time and can
be overridden by the @code{Prefix:} parameter in the configuration file.
David Byers's avatar
David Byers committed
195
196
197

@item portname
The parameter is a TCP/IP port. It can be a symbolic port name
198
(traditionally looked up in @file{/etc/services}) or a port number.
David Byers's avatar
David Byers committed
199
200
201

@item int
The parameter is a number of some sort. It can be a conference number,
202
text number or perhaps a timeout.
David Byers's avatar
David Byers committed
203

204
205
206
207
208
@item double
The parameter is a floating point number.  Any syntax that the C
function @code{strtod} accepts is OK.  Examples of truly portable
values: @samp{1} or @samp{1.3}.

David Byers's avatar
David Byers committed
209
210
@end table

211
212
A few parameters have ad-hoc types, that are used for a single
parameter.  They are documented in the description of that parameter.
David Byers's avatar
David Byers committed
213

214
@node Parameters
David Byers's avatar
David Byers committed
215
216
217
218
@subsection Parameters

@table @code

David Byers's avatar
David Byers committed
219
220
221
222
223
224
225
226
227
228
@item Max conferences: @var{int}
The maximum number of conferences possible in the server. This number
must be larger than the number of conferences in the database. This
parameter is required. There is no default.

@item Max texts: @var{int}
The maximum number of texts possible in the server. This number
must be larger than the number of texts in the database. This
parameter is required. There is no default.

229
230
@item Locale: @var{string}
Use @var{string} as the locale to run in. This parameter is only
David Byers's avatar
David Byers committed
231
232
233
234
available om systems which support the @code{setlocale} call. If this
parameter is not set, no call to @code{setlocale} will be made. The
default is unset.

235
@item Force ISO 8859-1: @var{bool}
David Byers's avatar
David Byers committed
236
237
This option is provided for those with dysfunctional computers that
cannot handle @code{setlocale} properly. If this is set, lyskomd will
238
handle texts according to the ISO 8859-1 (latin1) alphabet. Default
David Byers's avatar
David Byers committed
239
240
is off.

241
@item Prefix: @var{path}
242
243
244
245
Specify the installation prefix.  All relative filenames that the
server uses are interpreted relative to this directory.  The default
value of this parameter is set at compile time.  The default at
compile time is @file{/usr/lyskom}.
David Byers's avatar
David Byers committed
246

247
@item Send async: @var{bool}
David Byers's avatar
David Byers committed
248
249
250
251
Do not send any non-requested messages. This disables the sending of
messages about events in the server to all connections. Use of this
parameter is not recommended. Default is on.

252
253
254
255
256
257
258
@item Client host: @var{hostname}
Specify which IP number the server should use when listening for new
clients.  @var{hostname} may be a FQDN (such as
@samp{kom.lysator.liu.se}) or an IP number (such as @samp{10.0.0.1}).
Default is to bind @code{INADDR_ANY}, which means that the server will
listen to all IP numbers of the computer it is running on.

259
260
@item Client port: @var{portname}
Listen for new clients on port @var{portname}. The default is 4894, which
David Byers's avatar
David Byers committed
261
262
263
is what all clients expect. Do not change this parameter without really
good reason.

264
@item Presentation of conferences: @var{int}
265
The number of the conference where presentations should be sent.
David Byers's avatar
David Byers committed
266
267
268
269
Defaults to 1. This option is ignored in lyskomd 1.9 and later. Set this
using dbck or the @ref{(protocol-a)set-info,set-info}.


270
@item Presentation of persons: @var{int}
271
The number of the conference where presentations should be sent.
David Byers's avatar
David Byers committed
272
273
274
Defaults to 2. This option is ignored in lyskomd 1.9 and later. Set this
using dbck or the @ref{(protocol-a)set-info,set-info}.

275
@item Motd-conference: @var{int}
David Byers's avatar
David Byers committed
276
The number of the conference where "message-of-the-day" messages should
277
be sent. Defaults to 3. This option is ignored in lyskomd 1.9 and later.
David Byers's avatar
David Byers committed
278
279
Set this using dbck or the @ref{(protocol-a)set-info,set-info}.

280
@item News-conference: @var{int}
David Byers's avatar
David Byers committed
281
282
283
284
285
286
287
288
The number of the conference where news of interest to the readers of
this LysKOM server should be written. This is typically a conference
with very low traffic which everyone shoule be a member of. Clients
should offer new users to join it. Defaults to 4. This option is ignored
in lyskomd 1.9 and later. Set this using dbck or the
@ref{(protocol-a)set-info,set-info}.


289
@item Message of the day: @var{int}
David Byers's avatar
David Byers committed
290
291
292
293
294
295
Default message-of-the-day of this server. The text will be shown
automatically by conforming LysKOM clients when a user logs on. This
option is ignored in lyskomd 1.9 and later. Set this using dbck or the
@ref{(protocol-a)set-info,set-info}.


296
@item Garb: @var{bool}
David Byers's avatar
David Byers committed
297
298
299
Should the database be automatically purged of old texts?  The default
is on.

300
@item Never save: @var{bool}
301
302
Completely disables saving the database. Do not set this to @code{true}
unless you really know what you're doing. The default is @code{false}.
David Byers's avatar
David Byers committed
303

304
@item Log accesses: @var{path}
David Byers's avatar
David Byers committed
305
306
307
308
This parameter can only be set if the server has been compiled with
@code{LOGACCESSES} defined. It will save a trace of all activity in the
database to a file, for later use in simulations et c. Compiling with
@code{LOGACCESSES} slows the server down quite a lot, so it is normally
309
not defined.
David Byers's avatar
David Byers committed
310

311
@item Data file: @var{path}
312
313
314
315
The path relative to the installation prefix@footnote{The installation
prefix can be specified at compile time, and overridden by the
@code{Prefix:} parameter.} where part of the database is kept. The
default is @file{db/lyskomd-data}.
David Byers's avatar
David Byers committed
316

317
@item Backup file: @var{path}
David Byers's avatar
David Byers committed
318
The path relative to the installation prefix where a backup of the
319
database is kept. This file will always contain a complete database, but
320
it may be a little out-of-date. Default is @file{db/lyskomd-backup}.
David Byers's avatar
David Byers committed
321

322
@item Backup file 2: @var{path}
David Byers's avatar
David Byers committed
323
324
325
The path relative to the installation prefix where a previous generation
of the backup of the database is kept. This file may be needed if an
error in the backup file is detected during the creation of the data
326
file. Default is @file{db/lyskomd-backup-prev}.
David Byers's avatar
David Byers committed
327

328
329
330
331
332
333
@item Lock file: @var{path}
Name of the lock file that ensures that @code{dbck} and @code{lyskomd}
never attempt to modify the database at the same time.  It should always
reside in the same directory as the @samp{Data file}.  Default is
@file{db/lyskomd-lock}.

334
@item Text file: @var{path}
David Byers's avatar
David Byers committed
335
The path relative to the installation prefix where the actual texts in
336
the database are kept. Default is @file{db/lyskomd-texts}.
David Byers's avatar
David Byers committed
337

338
@item Text backup file: @var{path}
339
340
341
When @code{dbck} is run with the @samp{-g} option (@ref{Invoking
dbck}, it will store the previous contents of the text file in the
file specified by this option. The path is relative to the
342
343
344
345
346
347
348
349
350
351
installation prefix. This file is never used by @code{lyskomd}
itself. Default is @file{db/lyskomd-texts-backup}.

@item Backup export directory: @var{path}
When @code{splitkomdb} is run, it will create a copy of the database
in this directory.  The copy will be split in a way that helps to keep
incremental backups of that directory small.  @xref{splitkomdb}.  The
path is relative to the directory specified by @code{Prefix:}.  This
directory is never used by @code{lyskomd} itself.  Default is
@file{exportdb}.
David Byers's avatar
David Byers committed
352

353
@item Log file: @var{path}
David Byers's avatar
David Byers committed
354
The path relative to the installation prefix where log messages from
355
lyskomd are written. Default is @file{etc/server-log}.
David Byers's avatar
David Byers committed
356

357
358
@item Log statistics: @var{path}
Whenever lyskomd receives a SIGUSR1 it will append a timestamp and
David Byers's avatar
David Byers committed
359
360
a count of how many different atomic calls have been made in this file.
The path is relative to the installation prefix. Default is
361
@file{etc/lyskomd-log}.
David Byers's avatar
David Byers committed
362

363
@item Pid file: @var{path}
David Byers's avatar
David Byers committed
364
365
366
When lyskomd is up and running it will write its pid in this file. The
path is relative to the installation prefix. This file is used so the
@code{updateLysKOM} script can easily find out what pid the LysKOM
367
server has. Default is @file{etc/pid}.
David Byers's avatar
David Byers committed
368

369
370
371
This file should be removed when the computer reboots, before
@code{komrunning} or @code{updateLysKOM} is run.

372
@item Memory usage file: @var{path}
David Byers's avatar
David Byers committed
373
374
When lyskomd exits normally it appends some info on its usage of memory
to this file. The path is relative to the installation prefix. Almost
375
376
any memory leak bugs should be detectable by looking in this file.
Default is @file{etc/memory-usage}.
David Byers's avatar
David Byers committed
377

378
@item Aux-item definition file: @var{path}
David Byers's avatar
David Byers committed
379
This file defines which aux-items the server should support and how it
380
381
should handle them. You will find the details in
@xref{Aux-Item Definition File}.
David Byers's avatar
David Byers committed
382
The path is relative to the installation prefix. Default is
383
@file{etc/aux-items.conf}.
384
This file is re-read if a @samp{SIGWINCH} singal is sent to the server.
David Byers's avatar
David Byers committed
385

David Byers's avatar
David Byers committed
386
@item Core directory: @var{path}
387
The Directory where core dumps are written. This path is relative to the
David Byers's avatar
David Byers committed
388
389
installation prefix. Default is @file{cores}.

390
391
392
393
394
395
396
@item Connection status file: @var{path}
@itemx Connection status temp file: @var{path}
Where to store a status file that contains information about all
connections.  The status is written to the temp file and atomically
renamed to the status file.  The format is not yet documented, but
should be easy to understand.

397
398
399
@item Status file: @var{path}
This file is created by @code{komrunning} to indicate that lyskomd
should currently not be running.  When this file exists
David Byers's avatar
David Byers committed
400
@code{updateLysKOM} will send it a @samp{SIGHUP} signal, so that it
401
402
saves the database and dies.  Default is @file{etc/status}.

David Byers's avatar
David Byers committed
403
404
@item Nologin file: @var{path}
If this file exists, the server will not allow any connections at all.
David Byers's avatar
David Byers committed
405
Default is @file{/etc/nologin}.
David Byers's avatar
David Byers committed
406

407
@item Idle timeout: @var{int}
David Byers's avatar
David Byers committed
408
409
410
Number of milliseconds to sleep when there is nothing for lyskomd
to do. Default is @code{120000} (two minutes.)

411
@item Garb timeout: @var{garb}
David Byers's avatar
David Byers committed
412
413
414
415
Number of milliseconds to sleep when the server is garbage-collecting
texts, but has nothing else important to do. Default is @code{100} (0.1
seconds.)

416
@item Sync timeout: @var{sync}
David Byers's avatar
David Byers committed
417
418
419
Number of milliseconds to sleep when lyskomd is saving its database.
Defaults to 0.

420
@item Permissive sync: @var{bool}
David Byers's avatar
David Byers committed
421
Turning this option on lets any session sync the LysKOM database.
422
Turning it off restricts the operation to LysKOM administrators. Default
David Byers's avatar
David Byers committed
423
424
is off.

425
@item Garb interval: @var{int}
David Byers's avatar
David Byers committed
426
427
428
Number of minutes between each garb sweep. Defaults to @code{1440}, that
is, a garb sweep will be run once per day.

429
@item Sync interval: @var{int}
David Byers's avatar
David Byers committed
430
431
432
433
434
Number of minutes between syncs. The current version of lyskomd keeps
changes to the database in memory until they are synced to disk. This
parameter specifies the number of minutes the server waits before
attempting to dump the database. The default is @code{5}.

435
@item Sync retry interval: @var{int}
David Byers's avatar
David Byers committed
436
437
438
439
If anything goes wrong while trying to dump the data base (such as if
the disk is full), lyskomd will wait for this many minutes before trying
again. Default is @code{1}.

440
441
442
443
444
445
446
@item Saved items per call: @var{int}
When the server is saving the database, it does so in the background.
It serves one call from a client, saves a few items to the new database
file, serves another call, et c.  This parameter sets the number of
items (texts, conferences, persons) that are saved after each call.
Default is @code{5}.

David Byers's avatar
David Byers committed
447
448
449
450
@item Max client data length: @var{int}
The maxiumum allowed length for client name and version data. The
default is @code{60}.

451
@item Max conference name length: @var{int}
David Byers's avatar
David Byers committed
452
453
The maximum length of conference names. The default is @code{60}.

454
@item Max password length: @var{int}
David Byers's avatar
David Byers committed
455
456
457
458
Only the first eight characters of the password are currently
significant, even if this number is much larger. The default is
@code{128}.

459
@item Max what am I doing length: @var{int}
David Byers's avatar
David Byers committed
460
461
462
463
The maximum length of the string permitted in the protocol A call
@ref{(protocol-a)change-what-i-am-doing, change-what-i-am-doing}. The
default is 60.

464
@item Max username length: @var{int}
David Byers's avatar
David Byers committed
465
466
The maximum length permitted for user names. Default is 128.

467
@item Max text length: @var{int}
David Byers's avatar
David Byers committed
468
469
The maximum length allowed for a text. The default is 131072 characters.

470
471
472
473
@item Max aux_item length: @var{int}
The maximum length allowed for a single aux-item. The default is 16384
characters.

474
@item Max broadcast length: @var{int}
David Byers's avatar
David Byers committed
475
476
477
The maximum length allowed for broadcast messges. The default is 1024
characters.

478
@item Max regexp length: @var{int}
David Byers's avatar
David Byers committed
479
480
481
The maximum length allowed for regexps in various calls. The default is
1024 characters.

482
@item Max marks per person: @var{int}
David Byers's avatar
David Byers committed
483
484
485
The maximum number of marks a person is allowed to have. The default is
2048.

486
@item Max marks per text: @var{int}
David Byers's avatar
David Byers committed
487
488
The maximum number of marks a text can have. The default is 1024.

489
@item Max recipients per text: @var{int}
David Byers's avatar
David Byers committed
490
491
The maximum number of recipients of a text. The default is 512.

492
@item Max comments per text: @var{int}
David Byers's avatar
David Byers committed
493
494
The maximum number of comments a text can have. The default is 128.

495
@item Max footnotes per text: @var{int}
David Byers's avatar
David Byers committed
496
497
The maximum number of footnotes a text can have. The default is 32.

498
@item Max links per text: @var{int}
David Byers's avatar
David Byers committed
499
The maximum number of misc info items that can be added to a text.
David Byers's avatar
David Byers committed
500

501
@item Max mark_as_read chunks: @var{int}
David Byers's avatar
David Byers committed
502
@c FIXME: What is this?
David Byers's avatar
David Byers committed
503

504
@item Max super_conf loop: @var{int}
David Byers's avatar
David Byers committed
505
@c FIXME: What is this?
David Byers's avatar
David Byers committed
506

507
@item Max accept_async len: @var{int}
David Byers's avatar
David Byers committed
508
509
510
Maximum length of list accepted in the accept_async call. Default is
128.

511
@item Max aux_items deleted per call: @var{int}
David Byers's avatar
David Byers committed
512
513
514
Maximum number of aux_items that can be deleted in one call. Default is
128.

515
@item Max aux_items added per call: @var{int}
516
Maximum number of aux_items that can be added at once. Default is 128.
David Byers's avatar
David Byers committed
517

518
@item Default garb nice: @var{int}
David Byers's avatar
David Byers committed
519
520
521
522
523
Each conference has a lifetime for texts written in it. The lifetime is
counted in days, and can be set for each conference by the administrator
of the conference. This is the default value assigned to new
conferences. Default is 77 days.

524
@item Default keep commented nice: @var{int}
David Byers's avatar
David Byers committed
525
526
527
528
529
A text will not be removed if it has comments newer than a certain
number of days. This number can be set for each conference. This
parameter specifies the default value for that number of days. The
default is 77.

530
@item Max client transmit queue: @var{int}
Per Cederqvist's avatar
Per Cederqvist committed
531
Max number of pending data blocks in the reply queue to a client. If
David Byers's avatar
David Byers committed
532
533
534
535
there is ever more than this many data blocks in the queue the client
will be disconnected. Each atomic question typically generates two data
blocks. Default is 300.

536
@item Max simultaneous client replies: @var{int}
David Byers's avatar
David Byers committed
537
538
539
This is a performance tuning parameter of little real interest. Default
is 10.

540
@item Open files: @var{int}
David Byers's avatar
David Byers committed
541
542
543
544
545
Try to persuade the operating system to allow lyskomd to have this many
open file descriptors simultaneously. Each client that is connected to
the server occupies one file descriptor, and lyskomd needs several file
descriptors for internal purposes. Default is to not use this parameter.

546
547
548
549
550
551
552
553
554
555
556
557
558
@item Use DNS: @var{bool}
The IP address of a client is looked up using DNS when it connects.
Unfortunately, this lookup blocks the entire server, and it can take
several minutes.  You can disable DNS lookup with this parameter.
Default is on.

@item DNS log threshold: @var{double}
If the @samp{Use DNS:} parameter is true, the server will measure the
time each DNS lookup takes.  If the time exceeds the specified
threshold, an entry will be made in the log.  The value is specified
in seconds.  The default value is 1.5 seconds.  If your libc supports
it, you can enter @code{+inf} to disable logging.

559
@item Anyone can create new persons: @var{bool}
David Byers's avatar
David Byers committed
560
561
562
If this is set, anyone can create a new person, even if he lacks
special bits for doing so. Default is on.

563
@item Anyone can create new conferences: @var{bool}
David Byers's avatar
David Byers committed
564
565
566
If this is set, anyone can create a new conferences, even if he lacks
special bits for doing so. Default is on.

567
@item Allow creation of persons before login: @var{bool}
David Byers's avatar
David Byers committed
568
569
570
571
572
If this is set, persons can connect the the server and create a new
person without logging in.  This is how new users register in open
environments. If this option is off, then new persons can only be
created by existing users. The default is on.

573
@item Default change name capability: @var{bool}
David Byers's avatar
David Byers committed
574
575
576
If this is set, new users are created with the ability to change their
own name. Default is on.

577
@item Ident-authentication: @var{policy}
David Byers's avatar
David Byers committed
578
579
Decide how strictly the server should use the IDENT protocol.
The policy can take any of three values:
580

David Byers's avatar
David Byers committed
581
582
583
584
585
586
587
588
589
590
591
592
@table @asis
@item @code{off} or @code{never}
Do not use the IDENT protocol.

@item @code{on} or @code{try}
Use it, but allow logins even if the lookup fails.

@item @code{require} or @code{required}
Disallow connections if the server cannot find a IDENT login name.
@end table


593
@item Log login: @var{bool}
David Byers's avatar
David Byers committed
594
595
Should logins be logged to the log file?  Default value is off.

596
@item Cache conference limit: @var{int}
David Byers's avatar
David Byers committed
597
598
599
600
How many conference statuses the server cache should hold in main
memory. Default is 20. This parameter should be set to at least the
number of expected simultaneous logins.

601
@item Cache person limit: @var{int}
David Byers's avatar
David Byers committed
602
603
604
605
How many person statuses the server cache should hold in main
memory. Default is 20. This parameter should be set to at least the
number of expected simultaneous logins.

606
@item Cache text_stat limit: @var{int}
David Byers's avatar
David Byers committed
607
608
609
610
How many text statuses the server cache should hold in main
memory. The default is 20. This parameter should be increased on busy
servers.

611
612
@item Echo: @var{string}
Write @var{string} in the log when the config file is read.
David Byers's avatar
David Byers committed
613

614
@item Jubel: @var{pers_no} @var{text_no}
615
@itemx Jubel: public @var{pers_no} @var{text_no}
616
States that @var{pers_no} is not allowed to create text number
617
618
619
@var{text_no}. Default is unset. This parameter may be used multiple
times. The form with the string @code{public} means that the text must
have a public conference as recipient.
David Byers's avatar
David Byers committed
620

621
@item Jubel: @var{pers_no} @var{dividend} @var{remainder}
622
@item Jubel: public @var{pers_no} @var{dividend} @var{remainder}
623
624
States that @var{pers_no} is not allowed to create any text number
@var{T} which meets the condition @var{T} % @var{dividend} == @var{remainder}.
625
626
627
Default is unset. This parameter may be used multiple
times. The form with the string @code{public} means that the text must
have a public conference as recipient.
David Byers's avatar
David Byers committed
628

629
@item Add members by invitation: @var{bool}
David Byers's avatar
David Byers committed
630
631
632
633
If this is set, then adding others as members to a conference sets the
invitation bit of the membership. If this is off, the membership bit is
set to whatever the caller specifies. The default is on.

634
@item Allow secret memberships: @var{bool}
David Byers's avatar
David Byers committed
635
636
637
638
If this is set, then memberships may be secret. Otherwise any attempt
to create a secret membership or change an existing membership to a
secret membership will fail. The default is on.

639
@item Allow reinvitations: @var{bool}
David Byers's avatar
David Byers committed
640
641
642
643
644
645
If this is set, then it is possible to set the invitation bit of a
membership even after it has been cleared. If it is not set, then the
invitation bit of a conference type can only be set when the
membership is created. It can be cleared at any time. The default is
off.

646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
@item lyskomd path: @var{path}
Path to the @code{lyskomd} binary.  This is used by @code{updateLysKOM}
to find the right program to run.  Defaults to @file{bin/lyskomd}.

@item savecore path: @var{path}
Path to the @code{savecore} program.  If a file named @file{core} exists
in the directory specified with @code{Core directory} when
@code{updateLysKOM} is about to start @code{lyskomd}, this program will
be called first.  It could, for instance, move the core file so that it
is available for later debugging.

@item Normal shutdown time: @var{int}
In a normal setup, @code{updateLysKOM} will be run from @code{cron} once
every ten minutes or so.  If it detects that it has taken @code{lyskomd}
more than @var{int} minutes to shut down it will print a warning
message.

@item Mail after downtime: @var{int}
@itemx Mail until downtime: @var{int}

If @code{lyskomd} has been down for X minutes, where @code{Mail after
downtime} <= X < @code{Mail until downtime}, @code{updateLysKOM} will
send a mail message to the mail address found on the first line of the
status file.  Actually, it is the age of the status file (named with
@code{Status file}) that is measured.

David Byers's avatar
David Byers committed
672
673
674
@end table


675
@node Aux-Item Definition File
David Byers's avatar
David Byers committed
676
677
678
679
680
681
@section Aux-Item Definition File

The default aux-item definition file should not be changed unless it is
really necessary. The need to change the definitions will probably only
arise at installations used for client or server development.

682
683
The location of the aux-item definition file is specified by the
@code{Aux-item definition file} option in the server configuration
684
file. The default location is @file{/usr/lyskom/etc/aux-items.conf}.
David Byers's avatar
David Byers committed
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704


@subsection Syntax of the Aux-Item Definition File

The aux-item definition file contains a sequence of aux-item
definitions. Each definition specifies one type of predefined aux-item:
its number, name, and properties. Empty lines and all characters from a
# character to the end of the line are ignored.

Each entry has the following format:

@example
        tag : name (target, target, ... )
        @{
            field = value;
            field = value;
            ...
        @}
@end example

705
706
@var{tag} is an integer, the aux-item's tag. If a tag is defined more than
once, the last definition is used.
David Byers's avatar
David Byers committed
707

708
The @var{target}s specify what kind of objects aux-items with tag @var{tag}
David Byers's avatar
David Byers committed
709
710
711
712
713
714
715
716
717
718
719
720
can be added to. Valid targets are:

@table @code
@item any
Aux-items with the specified tag can be added to any object in the
database. This is shorthand for @code{text,conference,letterbox,server}.

@item text
Aux-items with the specified tag can be added to texts.

@item conference
Aux-items with the specified tag can be added to conferences that are
David Byers's avatar
David Byers committed
721
@emph{not} letterboxes.
David Byers's avatar
David Byers committed
722
723
724
725

@item letterbox
Aux-items with the specified tag can be added to conferences that are
letterboxes.
726
727
728
729

@item server
Aux-items with the specified tag can be added to the server itself.

David Byers's avatar
David Byers committed
730
731
732
733
734
735
736
737
738
739
@end table

It is legal to add one of the keywords @code{create} or @code{modify}
before any target except @code{server}. If @code{create} is specified,
aux-items with the specified tag can only be added when an object is
being created. They cannot be added later. If @code{modify} is
specified, aux-items with the specified tag can only be added after an
object has been created. They cannot be added when the object is being
created.

740
Each @var{field}/@var{value} pair specifies a property of aux-items with the
David Byers's avatar
David Byers committed
741
742
743
744
745
746
747
748
specified tag. Most values are boolean or trillian. Legal values for
either type are @code{true} and @code{false}. Boolean values have
reasonable defaults; trillian values can be unset.

@table @code

@item author-only
Boolean, default false. When true, only the author of a text or
749
supervisor of a conference can create items with this tag.
David Byers's avatar
David Byers committed
750
751
752
753

@item supervisor-only
Boolean, default false. When true, only the supervisors of the author or
letterbox can create items with this tag. In all likelihood, the
David Byers's avatar
David Byers committed
754
755
756
implementation of this flag is screwed up in version 2.0 of lyskomd.

@item system-only
757
Boolean, default false. When true, only the server can initiate creation
David Byers's avatar
David Byers committed
758
759
of items with this tag. This is normally used for items that are created
automatically in response to events in the system.
David Byers's avatar
David Byers committed
760

761
@item permanent
762
763
764
Boolean, default false. When true, aux-items with this tag cannot be
deleted once they have been created.  (They will be deleted
automatically when the object they are assigned to is deleted.)
David Byers's avatar
David Byers committed
765
766
767
768
769

@item unique
Boolean, default false. When true, there can only be one non-deleted
item with this tag per creator.

770
771
@item owner-delete
Boolean, default false. When true, the owner of the object that this
772
773
774
775
aux-item is attached to can always delete the aux-item.  For a text,
the owner is defined as the supervisor(s) of the author of the text.
For a conference, the owner is defined as the supervisor(s) of the
conference.
776

David Byers's avatar
David Byers committed
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
@item inherit-limit
Integer, default 0. The maximum number of times items with this tag can
be inherited, plus one. Zero means an unlimited number of times, one
means no times, 2 means once and so forth. This number overrides the
inherit-limit set by the client only if that number is higher than this
one.

@item inherit
Trillian. When set, the inherit bit on new items with this tag is forced
to the specified value.

@item secret
Trillian. When set, the secret bit on new items with this tag is forced
to the specified value.

792
@item hide-creator
David Byers's avatar
David Byers committed
793
794
795
Trillian. When set, the hide-creator bit on new items with this tag is
forced to the specified value.

796
@item dont-garb
David Byers's avatar
David Byers committed
797
798
799
800
801
802
803
804
805
806
Trillian. When set, the dont-garb bit on new items will be forced to the
specified value.

@item reserved-2
@item reserved-3
@item reserved-4
Trillian. When set, these flags force the values of the three reserved
bits in the aux-item flags field. These should only be used by lyskomd
developers, and then only very carefully.

807
@item validate
David Byers's avatar
David Byers committed
808
809
810

String or function, default none. When set to a string, this specifies a
regexp that must match the data field in newly created items with this
811
tag. If the regexp fails to match, then the item will not be created.
David Byers's avatar
David Byers committed
812
813
814
815
816
817
818
819
820
821
822
823
824
825
The syntax for strings is essentially the same as the syntax used in C
files. When set to a function, this specified a built-in validation
function to call.

The following validator functions are currently implemented:

@table @code

@item existing-readable-text
Creation is only allowed if the item contains the number of an existing
text that the item creator has permission to read.

@end table

David Byers's avatar
David Byers committed
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850

@end table

There are a few fields which specify actions the server is to take when
something happens to aux-items with the specified tag. Each of these
values is a function specification, the name of a trigger function
defined in lyskomd. The syntax for functions is the name followed by
an empty pair of parens. It is not possible to pass arguments to the
functions yet.

@table @code
@item add-trigger
Function to call when an item with the specified tag is added to an
object.

@item delete-trigger
Function to call when an item with the specified tag is scheduled for
deletion.

@item undelete-trigger
Function to call when an item with the specified tag scheduled for
deletion is unscheduled. It should undo the effects of the delete
trigger.
@end table

David Byers's avatar
David Byers committed
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
The following trigger functions are currently defined:

@table @code
@item mark-text
Increase the mark count for the text the item refers to. The item must
contain the number of a text. This trigger should be combined with the
existing-readable-text validation function.

@item unmark-text
Decrease the mark count for the text the item refers to. The item must
contain the number of a text. This trigger should be combined with the
existing-readable-text validation function.

@item link-faq
Create a faq-for-conf item linked to a faq-text item. This trigger is
used exclusively for faq-text items. The item must contain the number of
a text. This trigger must be combined with the existing-readable-text
validation function.

@end table


David Byers's avatar
David Byers committed
873
874


875
@node Running lyskomd
David Byers's avatar
David Byers committed
876
877
878
879
880
881
882
883
884
885
886
887
@chapter Running lyskomd

This section explains how to run lyskomd, the files it uses and how it
can be controlled while running.

@menu
* Invoking lyskomd::            How to run lyskomd.
* Signals::                     How to control lyskomd with Unix signals.
* Files::                       Files used by lyskomd.
@end menu


888
@node Invoking lyskomd
David Byers's avatar
David Byers committed
889
890
891
@section Invoking lyskomd

@example
892
        lyskomd [-d] [@var{config-file}]
David Byers's avatar
David Byers committed
893
894
@end example

David Byers's avatar
David Byers committed
895
The option @samp{-d} adds one to the debug level. The amount of output
David Byers's avatar
David Byers committed
896
897
898
899
on stderr is increased for each time the option is specified on the
command line. Furthermore, if this option is used, lyskomd will not run
as a daemon, but will stay in forground mode.

David Byers's avatar
David Byers committed
900
Using one @samp{-d} makes the process print a `>' for every timeout, a
David Byers's avatar
David Byers committed
901
902
903
904
message for every person that is connecting or disconnecting and a
message for every successful or unsuccessful communication to the
process.

905
The optional @var{config-file} argument can be used to specify the server
David Byers's avatar
David Byers committed
906
907
908
configuration file. @xref{Server Configuration File}.


909
@node Signals
David Byers's avatar
David Byers committed
910
911
912
913
914
@section Signals

It is possible to control some aspects of lyskomd using Unix signals.
The following signals have special meaning to the server:

David Byers's avatar
David Byers committed
915
@table @samp
David Byers's avatar
David Byers committed
916
917
918
919
920
921
922
923
924
925
926
927
928
@item SIGHUP
Logs out all sessions, saves the database and exits normally.

@item SIGQUIT
Saves the database and dump core. (This should only be used for
debugging purposes.)

@item SIGUSR1
Print statistics about how often different commands have been used
since the process started.

@item SIGUSR2
Forks a child that immediately dumps core. The main process just waits
929
until the child is done and then continues.
930
931
932

@item SIGWINCH
Re-read the aux-item definition file.
David Byers's avatar
David Byers committed
933
934
935
@end table


936
@node Files
David Byers's avatar
David Byers committed
937
938
939
940
941
@section Files Used by lyskomd

All file names can be changed in the server configuration file.
@xref{Parameters}.

942
@table @file
David Byers's avatar
David Byers committed
943
@item /usr/lyskom
944
945
946
Default value of the @code{Prefix} parameter. The default of this value
is set at compile time, but it can be changed in the server
configuration file.  @xref{Parameters}.
David Byers's avatar
David Byers committed
947

David Byers's avatar
David Byers committed
948
@item @var{prefix}/db/lyskomd-data
949
Half of the database: all status information.
David Byers's avatar
David Byers committed
950

David Byers's avatar
David Byers committed
951
@item @var{prefix}/db/lyskomd-texts
David Byers's avatar
David Byers committed
952
953
The other half of the database: the actual texts.

David Byers's avatar
David Byers committed
954
@item @var{prefix}/db/lyskomd-backup
955
A backup copy of @file{lyskomd-data}. Never, ever delete this file
David Byers's avatar
David Byers committed
956
957
958
unless you know what you are doing, or you may lose the entire data
base. Most of the time this is the only complete database file!

David Byers's avatar
David Byers committed
959
@item @var{prefix}/etc/pid
David Byers's avatar
David Byers committed
960
961
File with the pid of the lyskom-process.

David Byers's avatar
David Byers committed
962
963
@item @var{prefix}/etc/memory-usage
On normal exit, @code{lyskomd} will append some statistics to this file. 
David Byers's avatar
David Byers committed
964
965
It can be used for detecting memory leaks.

David Byers's avatar
David Byers committed
966
@item @var{prefix}/etc/aux-items.conf
David Byers's avatar
David Byers committed
967
This file contains definitions of the aux-items that the server should
968
support.  It is read by @code{lyskomd} at startup.
David Byers's avatar
David Byers committed
969

David Byers's avatar
David Byers committed
970
971
972
973
974
@item /etc/nologin
If this file exists, lyskomd will not allow anyone to connect to the
server. This path can be set with the @code{Nologin file} parameter in
the server configuration file.

David Byers's avatar
David Byers committed
975
976
977
@end table


978
@node Invoking updateLysKOM
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
@chapter Invoking updateLysKOM

@example
        updateLysKOM [-c @var{config-file}] [ -v ] [ -V ]
@end example

@code{updateLysKOM} determines if @code{lyskomd} should be running.  It
can start or stop @code{lyskomd} if needed.  It uses the same
configuration file as @code{lyskomd} (@pxref{Server Configuration
File}).  You can use @samp{-c @var{config-file}} to override the
compiled-in default.  Note, however, that this option is not passed
along to @code{lyskomd} if @code{updateLysKOM} starts it, so the option
should be used with extreme caution.

@samp{-v} and @samp{-V} causes @code{updateLysKOM} to report its version
number and exit.

@code{updateLysKOM} is normally run from @code{cron};
@pxref{Administration}.

999
@node Invoking komrunning
1000
1001
1002
1003
1004
1005
@chapter Invoking komrunning

@example
        komrunning [-c config-file] [start | stop]
        komrunning -v | -V
@end example
David Byers's avatar
David Byers committed
1006

1007
1008
@code{komrunning}, when invoked with no arguments, reports whether
@code{lyskomd} is currently running or not, and whether it should be
David Byers's avatar
David Byers committed
1009
1010
running or not.  @samp{komrunning start} attempts to start
@code{lyskomd}.  @samp{komrunning stop} attempts to stop @code{lyskomd},
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
and it will not return until the server has saved its database and
exited.

@code{komrunning} uses the same configuration file as @code{lyskomd}
(@pxref{Server Configuration File}).  You can use @samp{-c
@var{config-file}} to override the compiled-in default.  Note, however,
that this option is not passed along to @code{updateLysKOM} if
@code{komrunning} invokes it, so the option should be used with extreme
caution.

The @code{komrunning} can be installed in @file{/etc/init.d/}.  Be
careful, however, to ensure that the pid file is removed earlier during
the boot sequence.

1025
1026
1027
@samp{-v} and @samp{-V} causes @code{komrunning} to report its version
number and exit.

1028
@node Administration
David Byers's avatar
David Byers committed
1029
1030
1031
@chapter Administration

The first thing you will have to do is to follow the instructions in the
1032
1033
1034
files @file{INSTALL} and @file{README}. This will set up the LysKOM
system with a database containing a few necessary conferences and one
person - the administrator.
David Byers's avatar
David Byers committed
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044

Once the LysKOM system is running, there is not much you will have to do
to keep it that way. One thing to remember is that the current release
of the server has an incomplete handling of garbage collection of the
database. The database is split into two files, the information file and
the text file. Newly written texts are concatenated to the text file and
old texts are never removed. The information file contains information
about conferences, users and where in the text file the texts are. This
file is properly garbage collected, but not the text file.

1045
1046
1047
1048
1049
1050
1051
There is a program called @code{dbck} (Data Base Check) which is used
to check the consistency of the LysKOM database. This program can also
be used to shrink the text file. To do this, just type @samp{dbck
-g}. @xref{DBCK Reference}. When @code{dbck} is to be run on the
database, the LysKOM server @emph{must} be stopped, or unrepairable
damage may result. See below for a description on how to stop the
server.
1052
1053
1054
1055
1056

There is a program called @code{updateLysKOM} which is used to ensure
continuous operation. This program should be run with certain intervals,
for instance from @code{cron}. If the LysKOM server has died for some
reason, @code{updateLysKOM} restarts it. If the server is still running
David Byers's avatar
David Byers committed
1057
properly, @code{updateLysKOM} sends a signal (@samp{SIGUSR1}) to it,
1058
1059
which causes the server to write some statistics to a file named
@file{etc/lyskomd-log} in the lyskom directory.
David Byers's avatar
David Byers committed
1060
1061
1062

Taking the server down cleanly can be done in two ways: through the use
of the LysKOM protocol on a socket, preferably through the use of a
David Byers's avatar
David Byers committed
1063
suitable client, or by sending the signal @samp{SIGHUP} to it. This will
1064
1065
1066
1067
1068
1069
1070
1071
cause the server to save the database and close all client
connections. It will also create a file named @file{etc/memory-usage} in
which the memory usage of the server is reported.

To prevent @code{updateLysKOM} from restarting a server, create a file
named @file{/usr/lyskom/etc/status}. The file should contain a valid
mail address on the first line. @code{updateLysKOM} will not restart the
server as long as that file exists. In addition, if the file is between
1072
1073
1074
1075
1076
1 and 2 hours old (configurable) an email will be sent to the mail
address found in the file. If the file is older than that, an error
message will be printed on stderr and @code{updateLysKOM} will exit with
a non-zero exit status. cron is expected to deliver the error message to
an operator.
1077
1078
1079

The shell script @code{komrunning} can be used to start and stop the
LysKOM server. With no arguments, it will report the status.
David Byers's avatar
David Byers committed
1080
1081

@example
1082
        komrunning stop
David Byers's avatar
David Byers committed
1083
1084
@end example

1085
1086
1087
1088
1089
will (attempt to) shut down the server, creating the file
@file{/usr/lyskom/etc/status}.  If the user running @code{komrunning}
doesn't have permission to send signals to @code{lyskomd} the actual
shutdown will be delayed until the next time that @code{updateLysKOM} is
run.
David Byers's avatar
David Byers committed
1090
1091

@example
1092
        komrunning start
David Byers's avatar
David Byers committed
1093
1094
@end example

1095
1096
will restart the server.  The actual starting of the server will be done
by @code{updateLysKOM} the next time it is run.  @code{komrunning} only
1097
removes the  @file{/usr/lyskom/etc/status} file.
David Byers's avatar
David Byers committed
1098
1099


1100
@node Bugs
David Byers's avatar
David Byers committed
1101
1102
1103
@chapter Known Bugs

@itemize @bullet
David Byers's avatar
David Byers committed
1104
@item lyskomd should re-read the config file when a @samp{SIGHUP} is
David Byers's avatar
David Byers committed
1105
1106
received.

David Byers's avatar
David Byers committed
1107
@item lyskomd should terminate when a @samp{SIGINT} or @samp{SIGTERM} is
David Byers's avatar
David Byers committed
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
received.

@item The security policy is vague and the implementation is frayed at
the edges.

@item The choice of asynchronous messages is not very good.

@item The server uses too much memory.

@end itemize



David Byers's avatar
David Byers committed
1121
1122
1123
1124
1125
1126
1127
1128
1129

@c ======================================================================
@c ======================================================================
@c ==                                                                  ==
@c ==                            DBCK REFERENCE                        ==
@c ==                                                                  ==
@c ======================================================================
@c ======================================================================

1130
@node DBCK Reference
David Byers's avatar
David Byers committed
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
@chapter DBCK Reference

dbck is a program that can is used for minor database maintenance tasks
and for repairing a corrupt lyskomd database.

@menu
* DBCK Overview::               Overview of dbck.
* Invoking dbck::               How to run dbck.
* DBCK Notes::                  Notes about running dbck.
* DBCK Files::                  Files used by dbck.
* DBCK Bugs::                   Known bugs in dbck.
@end menu


1145
@node DBCK Overview
David Byers's avatar
David Byers committed
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
@section Overview

The dbck program is used for minor maintenance of the LysKOM database
and for repairing corrupt databases. In brief it performs the following
functions:

@itemize @bullet
@item Compact the text file to remove deleted texts.
@item Repair inconsistent membership information.
@item Repair invalid recipients
@item Repair inconsistent comment links
@item Correct invalid local text numbers
@item Correct invalid text maps
@item Set special conferences
@item Convert between database formats
@end itemize


1164
@node Invoking dbck
David Byers's avatar
David Byers committed
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
@section Invoking dbck

The functionality of dbck is controlled through command-line switches.
These are documented below.

If @code{dbck} is invoked without any options it will read the database
and report on its integrity.  No files will be modified.

@menu
* General Options::             Controlling the overall behavior of dbck.
* Database Repair Options::     Repairing errors in the LysKOM database.
* Format Conversion Options::   Converting the database file to a new format.
* Database Maintenance Options::  Options for database maintenance.
* Reporting Options::           Options controlling status reports.
@end menu


1182
@node General Options
David Byers's avatar
David Byers committed
1183
1184
1185
1186
1187
@subsection General Options

These options control the general behavior of lyskomd.

@table @asis
David Byers's avatar
David Byers committed
1188
@item @samp{-h} or @samp{--help}
David Byers's avatar
David Byers committed
1189
1190
1191
Give a usage message (which includes the version number and the
compiled-in default location of the config file) and exit immediately.

David Byers's avatar
David Byers committed
1192
@item @samp{-v} or @samp{--verbose}
David Byers's avatar
David Byers committed
1193
1194
Verbose mode. Report not only errors but the status of the database.

David Byers's avatar
David Byers committed
1195
1196
@item @samp{-F} or @samp{--force-output}
This option forces dbck to write the database file. Normally @code{dbck} 
David Byers's avatar
David Byers committed
1197
1198
1199
1200
1201
1202
will only write a new database file if changes have been made for some
other reason. If you want to simply convert a database from one version
to another, you will probably have to give this option.
@end table


1203
@node Database Repair Options
David Byers's avatar
David Byers committed
1204
1205
1206
1207
1208
@subsection Database Repair Options

The following options control database repair.

@table @asis
David Byers's avatar
David Byers committed
1209
@item @samp{-i} or @samp{--interactive}
David Byers's avatar
David Byers committed
1210
1211
1212
Run interactively. If any inconsistency is found, a remedial cure will
be suggested and the user must confirm the correction.

David Byers's avatar
David Byers committed
1213
@item @samp{-r} or @samp{--auto-repair}
David Byers's avatar
David Byers committed
1214
1215
Repair simple errors without asking.

David Byers's avatar
David Byers committed
1216
1217
@item @samp{-c} or @samp{--set-change-name}
Consider it an error if the @code{change-name} capability of a person is 
David Byers's avatar
David Byers committed
1218
1219
1220
1221
1222
1223
not set. Due to a bug that capability was never set for newly created
persons in release 1.6.1 of lyskomd. This option can be used to repair
the damage.
@end table


1224
@node Format Conversion Options
David Byers's avatar
David Byers committed
1225
1226
1227
1228
1229
1230
1231
@subsection Format Conversion Options

dbck can be used to conver the LysKOM database from one storage format
to another. This is necessary only when moving the database to a new
server version.

@table @asis
David Byers's avatar
David Byers committed
1232
1233
@item @samp{-F} or @samp{--force-output}
This option forces dbck to write the database file. Normally @code{dbck} 
David Byers's avatar
David Byers committed
1234
1235
1236
1237
will only write a new database file if changes have been made for some
other reason. If you want to simply convert a database from one version
to another, you will probably have to give this option.

David Byers's avatar
David Byers committed
1238
@item @samp{-o} or @samp{--output-version}
David Byers's avatar
David Byers committed
1239
This option is used to set the output version of the database. This
David Byers's avatar
David Byers committed
1240
option will normally be used in conjunction with the @samp{-F} option.
David Byers's avatar
David Byers committed
1241
1242
1243
1244
1245
1246
1247
1248
1249

Version 1.9 of @code{lyskomd} requires database version 1; version 2.0
requires database version 2. Versions of @code{lyskomd} prior to 1.9
requires database version 0. Note that information is irrevocably lost
when converting from a higher to a lower database version. This options
requires an argument: the output format version.
@end table


1250
@node Database Maintenance Options
David Byers's avatar
David Byers committed
1251
1252
1253
1254
1255
1256
1257
@subsection Database Update Options

dbck can be used to update certain aspects of the database that either
were impossible to update in early versions of protocol A or that are
inconvenient in all protocol versions.

@table @asis
David Byers's avatar
David Byers committed
1258
@item @samp{-g} or @samp{--compact-text-mass}
David Byers's avatar
David Byers committed
1259
Do garbage collection on the texts part of the database. This removes
1260
all unreferenced texts from the database.
David Byers's avatar
David Byers committed
1261

David Byers's avatar
David Byers committed
1262
@item @samp{-P} or @samp{--clear-password}
David Byers's avatar
David Byers committed
1263
1264
1265
1266
Clear the password of a specified user. This option is silently ignored
if the user does not exist. This option requires an argument: the ID of
the person whose password is to be cleared.

David Byers's avatar
David Byers committed
1267
@item @samp{-G} or @samp{--grant-all}
David Byers's avatar
David Byers committed
1268
1269
1270
1271
Grant all privileges to the specified user. This option is silently
ignored if the user does not exist. This option requires an argument:
the ID of the person who is to be granted all privileges.

David Byers's avatar
David Byers committed
1272
@item @samp{--pers-pres-conf}
David Byers's avatar
David Byers committed
1273
Set the person presentation conference of the server to the specified
1274
conference. Since version 1.9 of lyskomd the @code{set-info} call can be
David Byers's avatar
David Byers committed
1275
1276
used to do this.

David Byers's avatar
David Byers committed
1277
@item @samp{--conf-pres-conf}
David Byers's avatar
David Byers committed
1278
Set the conference presentation conference of the server to the specified
1279
conference. Since version 1.9 of lyskomd the @code{set-info} call can be
David Byers's avatar
David Byers committed
1280
1281
used to do this.