lyskomd.texi 31.3 KB
Newer Older
David Byers's avatar
David Byers committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
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
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
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
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
\input texinfo
@c $Id: lyskomd.texi,v 1.1 1998/12/30 12:50:47 byers Exp $
@c %**start of header
@setfilename lyskomd.info
@settitle "lyskomd Reference Manual"
@setchapternewpage odd
@c %**end of header

@ifinfo
This is the reference manual for the lyskomd LysKOM server version 2.0

Copyright @copyright{} 1999 Lysator ACS.

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
@title "lyskomd Reference Manual"
@sp 2
@subtitle "Server version 2.0"
@sp 2
@author by the lyskomd developers

@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1995-1999 Lysator ACS

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
@node Top, Copying, (dir), (dir)
@comment  node-name,  next,  previous,  up
@top lyskomd

lyskomd is a server for the LysKOM conferencing system. This info file
documents version 2.0 of lyskomd.

@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.
* Administration::              Administering a LysKOM server.
* Bugs::                        Known bugs.
@end menu

@end ifinfo

@node Copying, Overview, Top, Top
@comment  node-name,  next,  previous,  up
@chapter Copying

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 
contains the text of the license.


@node Overview, Installation, Copying, Top
@comment  node-name,  next,  previous,  up
@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
Computing Society and distributed under conditions of the GNU Public
License. LysKOM and its documentation is provided ``as is'' without
warranty of any kind.

This reference manual documents version 2.0 of the lyskomd LysKOM
server. The lyskomd server is the work of several people. The main
contributors have been
Per Cederqvist @email{ceder@@lysator.liu.se}, 
Inge Wallin @email{inge@@lysator.liu.se}, 
Thomas Bellman @email{bellman@@lysator.liu.se}, and
David Byers @email{byers@@lysator.liu.se}.

Commercial service for LysKOM is available from Signum Support
@url{http://www.signum.se/}.


@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
time we switched from RCS to CVS, and ceder started to write pcl-cvs (a
GNU Emacs front-end to CVS) instead of LysKOM. After a while, he started
writing Bugtrack, to be able to handle all bug reports he recieved about
pcl-cvs. He hopes to be able to devote some more time to LysKOM in the
future.



@node Installation, Configuration, Overview, Top
@comment  node-name,  next,  previous,  up
@chapter Installation

Instructions for compiling and installing lyskomd are in the file
INSTALL, located in the top level of the lyskomd distribution.
Installation should be straightforward on most platforms.


@node Configuration, Running lyskomd, Installation, Top
@comment  node-name,  next,  previous,  up
@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
Aux-Item List,The Aux-Item List}. 

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


@node Server Configuration File, Aux-Item Definition File, Configuration, Configuration
@comment  node-name,  next,  previous,  up
@section Server Configuration File

The server reads its configuration from a configuration file. The
default configuration file is @code{/usr/lyskom/etc/config}. The
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.
Empty lines and lines whose first non-blank character is a @code{#} are
ignored.

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

@node Parameter Types, Parameters, Server Configuration File, Server Configuration File
@comment  node-name,  next,  previous,  up
@subsection Parameter Types

Every parameter has a type. The legal types are:

@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
The parameter is a locale name. The value must be a legal locale name of 
the system where lyskomd is running.

@item path
The parameter is a path name. The value must be a legal path on the
system where lyskomd is running. Most paths you can specify are relative 
to the installation prefix which is specified at compile time or with
the Prefix parameter in the configuration file.

@item portname
The parameter is a TCP/IP port. It can be a symbolic port name
(traditionally looked up in @code{/etc/services}) or a port number.

@item int
The parameter is a number of some sort. It can be a conference number,
text number or perhaps a timeout. 

@end table


@node Parameters,  , Parameter Types, Server Configuration File
@comment  node-name,  next,  previous,  up
@subsection Parameters

@table @code

@item Locale : @i{string}
Use @i{string} as the locale to run in. This parameter is only
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.

@item Force ISO 8859-1: @i{bool}
This option is provided for those with dysfunctional computers that
cannot handle @code{setlocale} properly. If this is set, lyskomd will
handle texts according to the ISO 8859-1 (latin1) alphabet . Default
is off.

@item Prefix: @i{path}
All files that the server uses are found in sub-directories of this
directory. The default value of this parameter is set at compile time. 
The default at compile time is @code{/usr/lyskom}.

@item Send async: @i{bool}
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.

@item Client port: @i{portname}
Listen for new clients on port @i{portname}. The default is 4894, which
is what all clients expect. Do not change this parameter without really
good reason.

@item Mux port: portname
Listen for mux connections on @i{portname}. Muxes can be used to
multiplex several clients on a single file descriptor. The mux runs as a
separate process. This was used historically when LysKOM ran on a
machine were only 20 file descriptors coule be open at once. The mux
code has not been released. Send a mail to
@email{bug-lyskom@@lysator.liu.se} if you need it. The default port
number is 4895.

@item Presentation of conferences: int
The number of the conference where presentations should be sent. 
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}.


@item Presentation of persons: int
The number of the conference where presentations should be sent. 
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}.

@item Motd-conference: int
The number of the conference where "message-of-the-day" messages should
be sent. Defaults to 3. This option is ignored in lyskomd 1.9 and later. 
Set this using dbck or the @ref{(protocol-a)set-info,set-info}.

@item News-conference: int
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}.


@item Message of the day: int
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}.


@item Garb: bool
Should the database be automatically purged of old texts?  The default
is on.

@item Never save: bool
Do not use unless you know what you are doing. (Note: there is currently
no-one in the LysKOM development group which knows exactly what this
option does, so if you @i{do} know what you're doing, by all means let
us know!) The default is off.

@item Log accesses: path
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
not defined. 

@item Data file: path
The path relative to the installation prefix where part of the database
is kept. The default is @code{db/lyskomd-data}.

@item Backup file: path
The path relative to the installation prefix where a backup of the
database is kept. This file will always contain a complete database, but 
it may be a little out-of-date. Default is @code{lyskomd-backup}.

@item Backup file 2: path
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
file. Default is @code{lyskomd-backup-prev}.

@item Text file: path
The path relative to the installation prefix where the actual texts in
the database are kept. Default is @code{db/lyskomd-texts}.

@item Text backup file: path
When dbck is run with the @code{-g} option (@ref{(dbck)Invoking
dbck,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
installation prefix. This file is never used by lyskomd itself. Default
is @code{db/lyskomd-texts-backup}.

@item Log file: path
The path relative to the installation prefix where log messages from
lyskomd are written. Default is @code{etc/server-log}.

@item Log statistics: path
Whenever lyskomd receives a SIGHUP it will append a timestamp and
a count of how many different atomic calls have been made in this file.
The path is relative to the installation prefix. Default is
@code{etc/lyskomd-log}.

@item Pid file: path
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
server has. Default is @code{etc/pid}.

@item Memory usage file: path
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
any memory leak bugs should be detectable by looking in this Default is
@code{etc/memory-usage}. file.

@item Aux-item definition file: path
This file defines which aux-items the server should support and how it
should handle them. @xref{Aux-Item Definition File} for more details. 
The path is relative to the installation prefix. Default is
@code{etc/aux-items.conf}.

@item Core directory: path
The Directory where core dumps are written. This path is relative to the 
installation prefix. Default is @code{cores}.

@item Idle timeout: int
Number of milliseconds to sleep when there is nothing for lyskomd
to do. Default is @code{120000} (two minutes.)

@item Garb timeout: garb
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.)

@item Sync timeout: sync
Number of milliseconds to sleep when lyskomd is saving its database.
Defaults to 0.

@item Permissive sync: bool
Turning this option on lets any session sync the LysKOM database.
Turning it off restricts the operation to LysKOM administrators. Default 
is off.

@item Garb interval: int
Number of minutes between each garb sweep. Defaults to @code{1440}, that
is, a garb sweep will be run once per day.

@item Sync interval: int
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}.

@item Sync retry interval: int
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}.

@item Max conference name length: int
The maximum length of conference names. The default is @code{60}.

@item Max password length: int
Only the first eight characters of the password are currently
significant, even if this number is much larger. The default is
@code{128}.

@item Max what am I doing length: int
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.

@item Max username length: int
The maximum length permitted for user names. Default is 128.

@item Max text length: int
The maximum length allowed for a text. The default is 131072 characters.

@item Max broadcast length: int
The maximum length allowed for broadcast messges. The default is 1024
characters.

@item Max regexp length: int
The maximum length allowed for regexps in various calls. The default is
1024 characters.

@item Max marks per person: int
The maximum number of marks a person is allowed to have. The default is
2048.

@item Max marks per text: int
The maximum number of marks a text can have. The default is 1024.

@item Max recipients per text: int
The maximum number of recipients of a text. The default is 512.

@item Max comments per text: int
The maximum number of comments a text can have. The default is 128.


@item Max footnotes per text: int
The maximum number of footnotes a text can have. The default is 32.

@item Max links per text: int
FIXME: What is this?

@item Max mark_as_read chunks: int
FIXME: What is this?

@item Max super_conf loop: int
FIXME: What is this?

@item Max accept_async len: int
Maximum length of list accepted in the accept_async call. Default is
128.

@item Max aux_items deleted per call: int
Maximum number of aux_items that can be deleted in one call. Default is
128.

@item Max aux_items added per call: int
Maximum number of aux_items that can be added at once. Default is 2048.

@item Default garb nice: int
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.

@item Max client transmit queue: int
Mux number of pending data blocks in the reply queue to a client. If
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.

@item Max simultaneous client replies: int
This is a performance tuning parameter of little real interest. Default
is 10.

@item Open files: int
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.

@item Anyone can create new persons: bool
If this is set, anyone can create a new person, even if he lacks
special bits for doing so. Default is on.

@item Anyone can create new conferences: bool
If this is set, anyone can create a new conferences, even if he lacks
special bits for doing so. Default is on.

@item Allow creation of persons before login: bool
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.

@item Default change name capability: bool
If this is set, new users are created with the ability to change their
own name. Default is on.

@item Ident-authentication: policy
Decide how strictly the server should use the IDENT protocol.
The policy can take any of three values:
@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


@item Log login: bool
Should logins be logged to the log file?  Default value is off.

@item Cache conference limit: int
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.

@item Cache person limit: int
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.

@item Cache text_stat limit: int
How many text statuses the server cache should hold in main
memory. The default is 20. This parameter should be increased on busy
servers.

@item Echo: string
Write @i{string} in the log.

@item Jubel: pers_no text_no
States that @i{pers_no} is not allowed to create text number
@i{text_no}. Default is unset.

@item Jubel: pers_no dividend remainder
States that @i{pers_no} is not allowed to create any text number
@i{T} which meets the condition @i{T} % @i{dividend} == @i{remainder}.
Default is unset.

@item Add members by invitation: bool
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.

@item Allow secret memberships: bool
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.

@item Allow reinvitations: bool
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.

@item Regexps use collate table: bool
If this is set, regexp matching of conference names uses the same
collate table used by regular matching. This usually implies that the
regexp ``foo'' will match ``foo'', ``Foo'', ``fOo'' and several other
variants. The defalt is on.

@end table


@node Aux-Item Definition File,  , Server Configuration File, Configuration
@comment  node-name,  next,  previous,  up
@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.

The location of the aux-item definition file is specified by an option
in the server configuration file. The default location is
@code{/usr/lyskom/aux-items.def}


@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

@i{tag} is an integer, the aux-item's tag. If a tag is defined more than 
once, the last definition is used. 

The @i{target}s specify what kind of objects aux-items with tag @i{tag}
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
@i{not} letterboxes.

@item letterbox
Aux-items with the specified tag can be added to conferences that are
letterboxes.
@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.

Each @i{field}/@i{value} pair specifies a property of aux-items with the 
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
supervisor of a conference can create items with this tag. 

@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
implementation of this flag is screwed up.

@item permanent           
Boolean, default false. When true, items with this tag cannot be deleted
once they have been created.

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

@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.

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

@item dont-garb	    
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.

@item validate            
String, default none. When set, this specifies a regexp that must match
the data field in newly created items with this tag. If the regexp fails
to match, then the item will not be created. The syntax for strings is
essentially the same as the syntax used in C files.

@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



@node Running lyskomd, Administration, Configuration, Top
@comment  node-name,  next,  previous,  up
@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


@node Invoking lyskomd, Signals, Running lyskomd, Running lyskomd
@comment  node-name,  next,  previous,  up
@section Invoking lyskomd

@example
        lyskomd [-d] [@i{config-file}]
@end example

The option @code{-d} adds one to the debug level. The amount of output
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.

Uning on @code{-d} makes the process print a `>' for every timeout, a
message for every person that is connecting or disconnecting and a
message for every successful or unsuccessful communication to the
process.

The optional @i{config-file} argument can be used to specify the server
configuration file. @xref{Server Configuration File}.


@node Signals, Files, Invoking lyskomd, Running lyskomd
@comment  node-name,  next,  previous,  up
@section Signals

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

@table @code
@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
until the child is done and then continues. (This does not work on
Suns.)
@end table


@node Files,  , Signals, Running lyskomd
@comment  node-name,  next,  previous,  up
@section Files Used by lyskomd

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

@table @code
@item /usr/lyskom
Default value of @i{prefix}. The default of this value is set at compile 
time, but it can be changed in the server configuration file.
@xref{Parameters}.

@item @i{prefix}/db/lyskomd-data
Half of the database: all status information. This 

@item @i{prefix}/db/lyskomd-texts
The other half of the database: the actual texts.

@item @i{prefix}/db/lyskomd-backup
A backup copy of @code{lyskomd-data}. Never, ever delete this file
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!

@item @i{prefix}/etc/pid
File with the pid of the lyskom-process.

@item @i{prefix}/etc/memory-usage
On normal exit, @code{lyskomd} will append some statistics to this file. 
It can be used for detecting memory leaks.

@item @i{prefix}/etc/aux-items.conf
This file contains definitions of the aux-items that the server should
support.  It is read by @code{lyskomd} at startup. 

@end table



@node Administration, Bugs, Running lyskomd, Top
@comment  node-name,  next,  previous,  up
@chapter Administration

The first thing you will have to do is to follow the instructions in the
file INSTALL. This will set up the LysKOM system with a database
containing a few necessary conferences and one person - the
administrator.

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.

There is a program called 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 `dbck -g' in the database
directory, or give additional switches to dbck to use the correct
directory. See further the manual page for dbck. When dbck is to be run
on the database, the LysKOM server *must* be stopped, or unrepairable
damage may result. See below for a description on how to stop the
server.

There is a program called updateLysKOM which is used to ensure
continuous operation. This program is run with certain intervals and if
the LysKOM server has died for some reason, updateLysKOM restarts it. If
the server is still running properly, updateLysKOM sends a signal
(SIGUSR1) to it, which causes the server to write some statistics to a
file named etc/lyskomd-log in the lyskom directory.

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
suitable client, or by sending the signal SIGHUP to it. This will cause
the server to save the database and close all client connections. It
will also create a file named etc/memory-usage in which the memory usage
of the server is reported.

To prevent updateLysKOM from restarting a server, create a file named
/usr/lyskom/etc/status. The file should contain a valid mail address on
the first line. UpdateLysKOM will not restart the server as long as that
file exists. In addition, if the file is between 1 and 2 hours old 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
updateLysKOM will exit with a non-zero exit status. cron is expected to
deliver the error message to an operator.

The shell script komrunning can be used to start and stop the LysKOM
server. With no arguments, it will report the status.

@example
	komrunning off
@end example

will shut down the server, creating the file /usr/lyskom/etc/status,
while

@example
	komrunning on
@end example

will restart it.  The actual stopping and starting of the server will
be done by updateLysKOM the next time it is run.  komrunning only
creates the lock file.


@node Bugs,  , Administration, Top
@comment  node-name,  next,  previous,  up
@chapter Known Bugs

@itemize @bullet
@item lyskomd should re-read the config file when a @code{SIGHUP} is
received.

@item lyskomd should terminate when a @code{SIGINT} or @code{SIGTERM} is
received.

@item A very small memory leak still remains.

@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



@contents
@bye