From World of VOC - Wiki
SessionVOC Compiler
In general the SessionVOC compiler is called without any additional options
sevc desc.xml
--output arg
Changes the output filename, i.e. the name of generated shared object file, to arg instead of the default sessionvoc.so.
--verbose
If this option is specified, then some information about the executed commands is printed.
SessionVOC Server
The SessionVOC has a lot of options which allow you to adjust the server according to your needs. The most common options are
Command Line Options:
- --configuration: read configuration file
- --help: produce a usage message and exit
- --version: print version string and exit
Session options:
- --session.description-file: descriptor file for the session
- --session.database-option: argument must be <identifier>,<name>,<value>
Server Options:
- --server.session-port: port for SESSION requests
- --server.admin-port: port for ADMIN requests
Logging Options:
- --log.file: log to file (default: "+")
- --log.level: log level for severity 'human' (default: "info")
--change-directory arg
This option, when set, changes the working directory of the server to the directory specified. Note that this option is most useful when starting the server as a background process. The default working directory (when the server is started as a daemon) is /var/tmp.
-c [--configuration] arg
Specifies the name of the configuration file to use.
If this command is not passed to the SessionVOC, then by default, the server will attempt to first locate a file named ~/.sessionvoc/sessionvoc.conf in the user's home directory.
If no such file is found, the server will proceed to look for a file ./sessionvoc/sessionvoc.conf in the system configuration directory. The default installation specifies the system configuration directory as /etc. Therefore, in case that no configuration file is found in the user's home directory, the server will proceed to look for a file named /etc/sessionvoc.conf.
Only command line options with a value should be set within the configuration file. Command line options which act as flags should be entered on the command line when starting the Server.
White space is ignored. Each option is specified on a separate line in the form
- key = value
Alternatively, a header section can be specified and options pertaining to that section can be specified in a shorter form
- [log]
- level = trace
rather than specifying
- log.level = trace
Comments can be placed in the configuration file, only if the line begins with one or more hash symbols (#).
There may be occasions where a configuration file exists and the user wishes to override configuration settings stored in a configuration file. Any settings specified on the command line will overwrite the same setting when it appears in a configuration file. If the user wishes to completely ignore configuration files without necessarily deleting the file (or files), then add the command line option
- -c none
or
- --configuration none
when starting up the server. Note that, the word none is case-insensitive.
--daemon
Runs the SimpleVOC as a daemon (as a background process). This parameter can only be set if the pid (process id) file is specified. That is, unless a value to the parameter pid-file is given, then the server will report an error and exit.
--gid arg
The name (identity) of the group the server will run as. If this parameter is not specified, then the server will not attempt to change its GID, so that the GID the server runs as will be the primary group of the user who started the server. If this parameter is specified, then the server will change its GID after opening ports and reading configuration files, but before accepting connections or opening other files (such as recovery files).
This parameter is related to the parameter uid.
-h [--help]
Prints a list of the most common options available and then exits. In order to see all options use --help-all.
--pid-file arg
The name of the process ID file to use when running the server as a daemon. This parameter must be specified if either the flag daemon or supervisor is set.
--random.generator arg
The argument is an integer (1,2,3 or 4) which sets the manner in which random numbers are generated. The default method (3) is to use the a non-blocking random (or pseudorandom) number generator supplied by the operating system. Specifying an argument of 2, uses a blocking random (or pseudorandom) number generator. Specifying an argument 1 sets a pseudorandom number generator using an implication of the Mersenne Twister MT19937 algorithm. Algorithm 4 is a combination of the blocking random number generator and the Mersenne Twister.
--random.no-seed
By default, the random generator is seeded. Setting this option causes the random number generator not to be seeded. (Seeding the random number generator only occurs if the generator is set to Mersenne, refer to random.generator for details.)
--scheduler.backend arg
The IO method used by the event handler. The default (if this option is not specified) is to try all recommended backends. This is platform specific. See libev for further details and the meaning of select, poll and epoll.
--scheduler.threads arg
An integer argument which sets the number of threads to use in the IO scheduler. The default is 1.
--show.io-backends
If this option is specified, then the server will list available backends and exit. This option is useful only when used in conjunction with the option scheduler.backend. An integer is returned (which is platform dependent) which indicates available backends on your platform. See libev for further details and for the meaning of the integer returned. This describes the allowed integers for scheduler.backend.
--supervisor
Executes the server in supervisor mode. In the event that the server unexpectedly terminates due to an internal error, the supervisor will automatically restart the server. Setting this flag automatically implies that the server will run as a daemon. Note that, as with the daemon flag, this flag requires that the pid-file parameter will set.
--uid arg
The name (identity) of the user the server will run as. If this parameter is not specified, the server will not attempt to change its UID, so that the UID used by the server will be the same as the UID of the user who started the server. If this parameter is specified, then the server will change its UID after opening ports and reading configuration files, but before accepting connections or opening other files (such as recovery files). This is useful when the server must be started with raised privileges (in certain environments) but security considerations require that these privileges be dropped once the server has started work.
Observe that this parameter cannot be used to bypass operating system security. In general, this parameter (and its corresponding relative gid) can lower privileges but not raise them.
-v [--version]
Prints the version of the SessionVOC and exits.
Session Options
--session.database-option arg
The session description file contains information about the database connections. You can modify these values by specifying <identifer,name,value, where identifier must match the identifier used in the session description, name is either
- db: the name of the database
- host: the database host
- user: the database user
- password: the database password
and value is the new value.
--session.description-file arg
Specifies the shared object file generated by the SessionVOC compiler. This file contains the definition of the session data structure, databases to used, login procedures and timeouts. You must specify a valid description file.
--session.empty-timeout arg
TODO
--session.filesystem-database arg
TODO
--session.idle-timeout arg
TODO
--session.logout-timeout arg
TODO
--session.total-timeout arg
TODO
Form Options
--form.idle-timeout arg
TODO
--form.maximal-number arg
TODO
--form.maximal-size arg
TODO
Nonce Options
--nonce.hash-size arg
TODO
Snapshot Options
--snapshot.intervall arg
TODO
--snapshot.number arg
TODO
--snapshot.path arg
TODO
--snapshot.restore arg
TODO
--snapshot.restore-number arg
TODO
--snapshot.restore-path arg
TODO
--snapshot.start arg
TODO
Replication Options
These options are not available in the open edition of the SessionVOC.
--replication.local-server arg
TODO
--replication.partitions arg
TODO
--replication.range-size arg
TODO
--replication.remote-server arg
TODO
--replication.remote-session arg
TODO
--replication.server-instance arg
TODO
--replication.start arg
TODO
--replication.total-number-servers arg
TODO
External Trigger Options
These options are not available in the open edition of the SessionVOC.
--session.external-gc-connection-timeout arg
TODO
--session.external-gc-create arg
TODO
--session.external-gc-destroy arg
TODO
--session.external-gc-execution-retries arg
TODO
--session.external-gc-execution-timeout arg
TODO
--session.external-gc-login arg
TODO
--session.external-gc-logout arg
TODO
--session.external-gc-process arg
TODO
--session.external-login arg
TODO
--session.external-url arg
TODO
Server Options
--server.admin-directory arg
TODO
--server.admin-port arg
Specifies the port on which the server listens for administrative requests. The arg should either be a port number or an address and port in the form address:port.
--server.descriptor-minimum arg
An integer argument which sets the number of file descriptors the server requires. If the operating system imposes a lower limit, the server will try to raise the limit. If this fails, the server exists with an fatal error.
--server.fe-configuration arg
TODO
--server.report arg
The server logs a statistic about the scheduler and dispatcher queues every arg seconds.
--server.require-keep-alive
The server will close any http connection unless the keep-alive flag is sent by the client.
--server.reuse-address
When opening a listen port, the server will try to reuse the address.
--server.server-port arg
Specifies the port on which the server listens for client requests. The arg must be an address and port in the form address:port.
Logging Options
There are two different kinds of logs. Human-readable logs and machine-readable logs. The human-readable logs are used to provide an administration with information about the server. The machine-readable logs are used to provide statistics about executed requests and timings about computation steps.
See log.severity.
--log.file arg
This option allows the user to specify the name of a file to which information is logged. By default, if no log file is specified, the standard output is used. Note that, if the file named by arg does not exist, it will be created. However, if the file already exists, output is appended to the file. Use + to log to standard error. Use "" to disable logging to file.
--log.severity arg
This parameter provides a set of standard log outputs which can be used. The current arguments accepted are:
exception
technical
functional
development
human
all
non-human
The default is all.
--log.syslog arg
If this option is set, then in addition to output being directed to the standard output (or to a specified file, in the case that the command line log.file option was set), log output is also sent to the system logging facility. The arg is the system log facility to use. See syslog for further details.
Human-Readable Logging
-l [--log.level] arg
Allows the user to choose the level of information which is logged by the server.
The arg is specified as a string and can be one of the highlighted values listed
below. Note that, fatal errors, that is, errors which cause the server to terminate,
are always logged irrespective of the log level assigned by the user.
fatal — logs errors which cause the server to terminate.
Fatal errors generally indicate some inconsistency with the manner in which the server has been coded. Fatal errors may also indicate a problem with the platform on which the server is running. Fatal errors always cause the server to terminate. For example,
-
2010-09-20T07:32:12Z [4742] FATAL a http server has already been created
error — logs errors which the server has encountered.
These errors may not necessarily result in the termination of the server. For example,
-
2010-09-17T13:10:22Z [13967] ERROR strange log level 'errors', going to 'warning'
warning — provides information on errors encountered by the server, which are not necessarily detrimental to it's continued operation. For example,
-
2010-09-20T08:15:26Z [5533] WARNING got corrupted HTTP request 'POS?'
Note that, setting the log level to warning will also result in all errors to be logged as well.
info — logs information about the status of the server. For example,
-
2010-09-20T07:40:38Z [4998] INFO SimpleVOC ready for business
Note that, setting the log level to info will also result in all errors and warnings to be logged as well.
debug — logs all errors, all warnings and debug information.
Debug log information is generally useful to find out the state of the server in the case of an error. For example,
-
2010-09-17T13:02:53Z [13783] DEBUG (ApplicationServer/ApplicationServerImpl.cpp:1200) opened port 7000 for any
Note that, setting the log level to debug will also result in all errors, warnings and server status information to be logged as well.
trace — as the name suggests, logs information which may be useful to trace problems encountered with using the server. For example,
-
2010-09-20T08:23:12Z [5687] TRACE (ApplicationServer/ApplicationServerImpl.cpp:1088) trying to open port 8000 for http requests, token = '0'
Note that, setting the log level to trace will also result in all errors, warnings, status information, and debug information to be logged as well.
--log.line-number
Normally, if an human readable fatal, error, warning or info message is logged, no information about the file and line number is provided. The file and line number is only logged for debug and trace message. This option can be use to always log these pieces of information.
--log.prefix arg
This option is used specify an prefix to logged text.
--log.thread
Whenever log output is generated, the process ID is written as part of the log information. Setting this option appends the thread id of the calling thread to the process id. For example,
2010-09-20T13:04:01Z [19355] INFO SimpleVOC ready for business 2010-09-20T13:04:01Z [19355] INFO VOC version 1.6.1 (6734:6766)
when no thread is logged and
2010-09-20T13:04:17Z [19371-18446744072487317056] INFO SimpleVOC ready for business 2010-09-20T13:04:17Z [19371-18446744072487317056] INFO VOC version 1.6.1 (6734:6766)
when this command line option is set.
Machine-Readable Logging
--log.application arg
Specifies the name of the application which should be logged if this item of information is to be logged.
Also see log.format.
--log.facility arg
Specifies the name of the server instance which should be logged if this item of information is to be logged.
Also see log.format.
--log.format arg
If the log output is machine (or machine readable), then this parameter allows you to configure the format of the output. The following placeholders are available:
%A the application name
%C the category which caused the output (e.g. FATAL, ERROR, WARNING etc.)
%H the host name to log
%T date/time stamp
%Z date/time stamp in GMT (zulu)
%f source code module
%l source code line
%m source code method
%p pid
%s pthread identifier
%t tid
%u user identifier
%x the actual text
Here is an example of an output for tracing a problem:
--log.format %f;%l;%m;%C;%x
--log.hostname arg
Specifies the name of the operating environment (the "hostname") which should be logged if this item of information is to be logged. Note that there is no default hostname.
Also see log.format.
