Parameter Types

Top  Previous  Next

Configuration parameters can be of the following types:

Address—network connection address specified as <IP address>:<port> pair of values. In some cases, the port value can be omitted (if so, it is specified in the parameter description).

Boolean—flag used as an indicator. Such parameters can have either Yes or No as values.

Integer—parameter value can be a non-negative integer as a value.

Fractional number—parameter value can be a non-negative number with a fractional part.

Time interval—parameter value can be a time interval, consisting of a non-negative integer and a suffix (letter), which stands for a time unit. The following suffixes can be used:

w – weeks (1w = 7d);

d – days (1d = 24h);

h – hours (1h = 60m);

m – minutes (1m = 60s);

s—seconds.

If the suffix is omitted, the interval is considered as in seconds. For the time interval, expressed in seconds, it is allowed to specify milliseconds after a point (but no more than three digits after the separator, for example, 0.5s – 500 milliseconds). It is possible to specify several time intervals in different time units. In this case, the resulting interval is counted as a sum of intervals (in fact, a time interval is always converted to milliseconds before the value is written to configuration).

In general terms, any time an interval can be represented as an expression of this form: N1wN2dN3hN4mN5[.N6]s, where N1, ..., N6 is a number of corresponding time unites included in this interval. For example, a year (365 days) can be represented as follows (all records are equal):365d, 52w1d, 52w24h, 51w7d24h, 51w7d23h60m, 8760h, 525600m, 31536000s.

The examples below show you how intervals of 30 minutes, 2 seconds, 500 milliseconds can be specified:

1. In the configuration file:

UpdateInterval = 30m2.5s

2. Using the command drweb-ctl cfset:

# drweb-ctl cfset Update.UpdateInterval 1802.5s

3. Via a command-line parameter (for example, for the Command Line Arguments):

$ drweb-se --WatchdogInterval 1802.5

Size—parameter value can be the size of an object (file, buffer, cash, and so on), consisting of a non-negative integer and a suffix, which stands for a unit. The following suffixes can be used:

mb—megabytes (1mb = 1024kb);

kb—kilobytes (1kb = 1024b);

b—bytes.

If the suffix is omitted, the size is considered as in bytes. It is possible to specify several sizes in different units. In this case, the resulting size is counted as their sum (in fact, a size value is always converted to bytes).

path to a directory (file)—parameter value can be a string, which is a path to a directory (file). Note that the file path must be ended with the file name.

In UNIX-like systems, names of catalogs and files are case sensitive. If it is not explicitly designated in a parameter description, paths cannot contain masks with special characters (?, *).

Logging level—the level at which Dr.Web for UNIX File Servers events are logged. The parameter of this type can have the following values:

DEBUG—the most detailed logging level. All messages and debug information are registered.

INFO—all messages are registered.

NOTICE—all error messages, warnings, and notifications are registered.

WARNING—all error messages and warnings are registered.

ERROR—only error messages are registered.

Log type—parameter value defines how Dr.Web for UNIX File Servers performs logging (its logging method). The parameter of this type can have the following values:

Stderr[:ShowTimestamp]—Messages are displayed in the stderr—standard error stream. This value can be used only in the settings of configuration daemon. At that, if it works in background mode (“daemonized“), i.e. it is launched with the parameter -d specified, this value cannot be used because components operating in the background mode cannot access I/O streams of the terminal). The additional parameter ShowTimestamp instructs to add a time stamp to every message.

Auto—messages for logging are sent to the configuration daemon Dr.Web ConfigD, which saves them to one location according to its configuration (the parameter Log in the [Root] section). This value is specified for all components except for the configuration daemon and is used as a default value.

Syslog[:<facility>]—messages are transmitted to the system logging service syslog.

Additional option <facility> is used to specify a level at which syslog registers messages. The following values are possible:

DAEMON—messages of daemons.

USER—messages of user processes.

MAIL—messages of mail programs.

LOCAL0—messages of local processes 0.

...

LOCAL7—messages of local processes 7.

<path>—Messages are to be saved directly to the specified log.

Example of how to specify the parameter value:

1. In the configuration file:

Log = Stderr:ShowTimestamp

2. Using the command drweb-ctl cfset:

# drweb-ctl cfset Root.Log /var/opt/drweb.com/log/general.log

3. Via a command-line parameter (for example, for the Command Line Arguments):

$ drweb-se --Log Syslog:DAEMON

action—action performed by Dr.Web for UNIX File Servers upon detection of certain threats or upon another event. The following values are possible:

Report—instructs only to notify on threat detection without performing any other action.

Block—instructs to block all attempts to access the infected file without modifying it (the action might not be available for all components).

Cure—instructs to attempt to cure the threat (that is, remove only malicious content).

Quarantine—instructs to move the infected file to quarantine.

Delete — instructs to delete the infected file.

Some of the actions can be applied only upon certain events (for example, a “scanning error” event cannot trigger the Cure action). Allowed actions are always listed in the parameter description of the action type.

Other parameter types and their possible values are specified in the description of these parameters.