Command-Line Arguments

To start Dr.Web Scanning Engine from the command line, run the following command:

$ <opt_dir>/bin/drweb-se <socket> [<parameters>]

where the mandatory <socket> argument indicates an address of a socket used by Dr.Web Scanning Engine for processing requests of client components. It can be set only as a file path (a UNIX socket).

Dr.Web Scanning Engine accepts the following parameters:

Parameter

Description

--help

Function: Output short help information about command-line parameters to the console or the terminal emulator and shut down the component.

Short form: -h

Arguments: None.

--version

Function: Output information about the component version to the console or the terminal emulator and shut down the component.

Short form: -v

Arguments: None.

Startup options (identical to configuration file parameters and substitute them when necessary):

--CoreEnginePath

Function: Path to the library of Dr.Web Virus-Finding Engine.

Short form: None.

Arguments: <path to file>—full path to the library in use.

--VirusBaseDir

Function: Path to a directory with virus database files.

Short form: None.

Arguments: <path to directory>—full path to the virus database directory.

--TempDir

Function: Path to a directory with temporary files.

Short form: None.

Arguments: <path to directory>—full path to the directory with temporary files.

--KeyPath

Function: Path to the key file in use.

Short form: None.

Arguments: <path to file>—full path to the key file.

--MaxForks

Function: Maximum allowed number of child processes that can be spawned by Dr.Web Scanning Engine during scanning.

Short form: None.

Arguments: <number>—maximum allowed number of child processes.

--WatchdogInterval

Description: Frequency with which Dr.Web Scanning Engine checks whether child processes are operable and ends those that stopped responding.

Short form: None.

Arguments: <time interval>—frequency of checking child processes.

--AbortForkOnTimeout

Function: Terminate scan processes by sending them SIGABRT on timeout.

Short form: None.

Arguments: None.

--ShellTrace

Function: Shell tracing (log detailed information about file scanning performed by Dr.Web Virus-Finding Engine).

Short form: None.

Arguments: None.

--LogLevel

Description: Logging level of Dr.Web Scanning Engine during its operation.

Short form: None.

Arguments: <logging level>. Allowed values:

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

INFO—all messages are logged.

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

WARNING—all error messages and warnings are logged.

ERROR—only error messages are logged.

--Log

Description: Logging method of the component.

Short form: None.

Arguments: <log type>. Allowed values:

Stderr[:ShowTimestamp]—output messages to the standard error stream stderr.
The ShowTimestamp option is used to add a timestamp to every message.

Syslog[:<facility>]—pass messages to the syslog system logging service.
The <facility> additional option is used to specify a type of a log to store messages logged by syslog. Allowed values:

oDAEMON—messages from daemons;

oUSER—messages from user processes;

oMAIL—messages from mailers;

oLOCAL0—messages from local processes 0;

...

oLOCAL7—messages from local processes 7.

<path>—path to a file for storing log messages.

Examples:

--Log /var/opt/drweb.com/log/se.log

--Log Stderr:ShowTimestamp

--Log Syslog:DAEMON

Example:

$ /opt/drweb.com/bin/drweb-se /tmp/drweb.ipc/.se --MaxForks=5

This command starts an instance of Dr.Web Scanning Engine and instructs it to create the /tmp/drweb.ipc/.se UNIX socket to interact with client components and limit the number of child scanning processes to 5.

Startup Notes

If necessary, any number of instances of Dr.Web Scanning Engine can be started, which provide the scanning service for client applications (not only for Dr.Web for UNIX Mail Servers components). At that, if a value of the FixedSocketPath parameter is specified in the component settings, one instance of the scanning engine is always run by the Dr.Web ConfigD configuration management daemon and available to the clients via the UNIX socket. Instances of the scanning engine started directly from the command line will operate in standalone mode without establishing connection to the configuration management daemon, even if it is running. To manage the operation of the component, as well as to scan files upon request, use the Dr.Web Ctl tool designed to manage Dr.Web for UNIX Mail Servers from the command line .

To start the Dr.Web Ctl tool, run the drweb-ctl command.

 

To scan an arbitrary file or directory with Dr.Web Scanning Engine, use the rawscan command of the Dr.Web Ctl tool:

$ drweb-ctl rawscan <path to file or directory>

 

To get documentation for this component from the command line, run the man 1 drweb-se command.