Command-Line Arguments

To run the scan engine Dr.Web Scanning Engine from the command line, type the following command:

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

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

Dr.Web Scanning Engine can process the following options:

Parameter

Description

--help

Function: Output short help information about command-line parameters to the console or to the terminal emulator and to exit upon completion.

Short form: -h

Arguments: None.

--version

Function: Output information about the version of this component to the console or to the terminal emulator and to exit after completion.

Short form: -v

Arguments: None.

Additional launch parameters (they are the same as configuration file parameters and substitute them when required):

--CoreEnginePath

Function: Specify the path to the library of the Dr.Web Virus-Finding Engine scan engine.

Short form: No.

Arguments: <path to the file>—a full path to the library that you want to use.

--VirusBaseDir

Function: Specify the path to the directory with virus database files.

Short form: No.

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

--TempDir

Function: Specify the path to the directory with temporary files.

Short form: No.

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

--Key

Function: Specify the path to the key file.

Short form: No.

Arguments: <path to the file>—a full path to the key file that you want to use.

--MaxForks

Function: Specify the maximum allowed number of child processes which can be started by Dr.Web Scanning Engine during scanning.

Short form: No.

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

--WatchdogInterval

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

Short form: No.

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

--Shelltrace

Function: Turn on the shell tracing (log detailed information on file scanning performed by Dr.Web Virus-Finding Engine).

Short form: No.

Arguments: None.

--LogLevel

Description: Set the level of logging executed by Dr.Web Scanning Engine during the operation.

Short form: No.

Arguments: <logging level>. Allowed 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

Description: Specify the method for logging component messages.

Short form: No.

Arguments: <log type>. Allowed values:

Stderr[:ShowTimestamp]—messages are output to a standard error stream stderr.
The additional option ShowTimestamp is used to add a time stamp to every message.

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:

oDAEMON—messages of daemons.

oUSER—messages of user processes.

oMAIL—messages of mail programs.

oLOCAL0—messages of local processes 0.

...

oLOCAL7—messages of local processes 7.

<path>—path to the file where all messages are registered.

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 the Dr.Web Scanning Engine scan engine, creates the /tmp/drweb.ipc/.se UNIX socket for the interaction with the client components and limits the number of child scanning processes to 5.

Startup Notes

When necessary, any number of instances of the Dr.Web Scanning Engine scan engine can be started. The instances provide the scanning service for client applications (not only for the Dr.Web for UNIX Mail Servers components). At that, if a value of the FixedSocketPath parameter is specified in the component configuration, one instance of the scan engine is always running by the Dr.Web ConfigD configuration daemon and is always available for the clients via this UNIX socket. The instances of the scan engine started directly from the command line, will operate in an autonomous mode without establishing connection to the configuration daemon, even if it is running. To manage the operation of the component, as well as to scan files when needed, you can use the Dr.Web Ctl command-line-based management tool for Dr.Web for UNIX Mail Servers (it is launched by using the drweb-ctl command).

To scan an arbitrary file or directory using Dr.Web Scanning Engine you can use rawscan command of Dr.Web Ctl tool:

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

To get documentation about this component of the product from the command line, use the following command: man 1 drweb-se.