H3.8. The Description of Switches

Crossplatform switches

-activation-key=<license_key>—Server license key. By default, it is the enterprise.key file located in the etc subfolder of the root folder.

Please note that the Server license key file is no longer used from the version 10. The -activation-key switch may be used during the Server upgrade from the previous versions and database initialization: the Server identifier will be taken from the specified licence key.

-bin-root=<folder>—the path to executable files. By default, it is the bin subfolder of the root folder.

-conf=<file>—name and location of the Server configuration file. By default, it is the drwcsd.conf file in the etc subfolder of the root folder.

-daemon—for Windows platforms it means to launch as a service; for UNIX platforms—"daemonization of the process" (to go to the root folder, disconnect from the terminal and operate in the background).

-db-verify=on—check database integrity at Server start. This is the default value. It is not recommended to run with an explicit opposite value, except if run immediately after the database is checked by the drwcsd verifydb instruction, see above.

-help—displays help. Similar to the programs described above.

-hooks—to permit the Server to perform user extension scripts located in the:

for Windows OS: var\extensions

for FreeBSD OS: /var/drwcs/extensions

for Linux OS: /var/opt/drwcs/extensions

subfolder of the Server installation folder. The scripts are meant for automation of the administrator work enabling quicker performance of certain tasks. All scripts are disabled by default.

-home=<folder>—Server installation folder (root folder). The structure of this folder is described in Installation Manual, p. Installing Dr.Web Server for Windows OS. By default, it is the current folder at start.

-log=<log_file>—activate logging to the file at the specified path.

For Servers under UNIX system-based OS, the "minus" sign can be used instead of the filename, which instructs standard output of the log.

By default: for Windows OS, it is drwcsd.log in the folder specified by the -var-root switch, for UNIX system-based OS, it is set by the -syslog=user switch (see below).

-private-key=<private_key>—private encryption key of the Server. By default, it is drwcsd.pri in the etc subfolder of the root folder.

-rotate=<N><f>,<M><u>—Server log rotation mode, where:

Parameter

Description

<N>

Total number of log files (including current and archive).

<f>

Log files storing format, possible values:

z (gzip)—compress files, used by default,

p (plain)—do not compress files.

<M>

Log file size or rotation time, depending on the <u> value;

<u>

Unit measure, possible values:

to set rotation by log file size:

k—Kb,

m—Mb,

g—Gb.

to set rotation by time:

H—hours,

D—days,

W—weeks.

info

If rotation by time is set, synchronisation performs independently on command launch time: the H value means synchronisation with the beginning of an hour, D—with beginning of a day, W—with beginning of a week (00:00 on Monday) according to the multiplicity specified in the <u> parameter.

Initial reference point—January 01, year 01 AD, UTC+0.

By default, it is 10,10m, which means storing of 10 files 10 megabytes each, use compression. Alternatively you can use the none format (-rotate=none), which means "do not use rotation, always write to the same file of unlimited size".

In the rotation mode, log file names are generated as follows: file.<N>.log or file.<N>.log.gz, where <N>—sequence number: 1, 2, etc.

For example, the log file name is set to file.log (see the –log switch above), then

file.log—current log file,

file.1.log—previous log file,

file.2.log and so on—the greater the number, the older the version of the log.

-trace—to log in detail the location of error origin.

-var-root=<folder>—path to a folder to which the Server has a write access and which is designed to store modified files (for example, logs and the repository files). By default, it is the var subfolder of the root folder.

-verbosity=<level>—log level of detail. WARNING is by default. Allowed values are: ALL, DEBUG3, DEBUG2, DEBUG1, DEBUG, TRACE3, TRACE2, TRACE1, TRACE, INFO, NOTICE, WARNING, ERROR, CRIT. The ALL and DEBUG3 values are synonyms.

If necessary, it is possible to set specific levels of detail for several message sources at once in the following format:

-verbosity=<message_source1>:<level1>,<message_source2>:<level2>,<message_source3>:<level3> and so on. In this case, <level> is inherited on general principle, i.e. it looks for the closest parental source with specified level of detail. The -verbosity=all:all switch is equal to the -verbosity=all switch (see also Appendix K. Log Files Format).

info

This key defines the log level of detail set by the subsequent -log key (read above). One instruction can contain several switches of this type.

 

The -verbosity and -log switches are position-relative.

In case of using these keys simultaneously, the -verbosity switch must be set before the -log switch: the -verbosity switch redefines detail level of logs, that reside in folder, specified in the following switch.

Switches for Windows OS Only

-minimized—(if run not as a service, but in the interactive mode)—minimize a window.

-service=<service_name>—the switch is used by running service process for self-identification and activation of the self-protection for the registry branch of the Server service. <service_name> is a suffix that is added to the default name of the service; at this, the full name of the service is DrWebES-<service_name>.

The switch is used by the install command; independent use is not provided.

-screen-size=<size>—(if run not as a service, but in the interactive mode)—log size in lines displayed in the Server screen, the default value is 1000.

Switches for UNIX system-based OS Only

-etc=<path>—path to the etc (<var>/etc) directory.

-keep—do not remove temporary directory after the Server installation.

-pid=<file>—a file to which the Server writes the identifier of its process.

-syslog=<mode>—instructs logging to the system log. Possible modes: auth, cron, daemon, kern, lpr, mail, news, syslog, user, uucp, local0local7 and for some platforms—ftp, authpriv.

info

The -syslog and -log keys work together. I.e., if you start the Server with the -syslog key (e.g., service drwcsd start -syslog=user), the Server run with specified value for the -syslog key and with default value for the -log key.

-user=<user>, -group=<group>—available for UNIX OS only, if run by the root user; it means to change the user or the group of process and to be executed with the permissions of the specified user (or group).