8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / vscanadm.1m
blob3970383ce4256633d7d0d1d752a8b1ea3e947fe6
1 '\" te
2 .\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH VSCANADM 1M "Jul 7, 2009"
7 .SH NAME
8 vscanadm \- vscan service configuration utility
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBvscanadm\fR \fBset\fR \fB-p\fR \fIproperty\fR=\fIvalue\fR [\fB-p\fR \fIproperty\fR=\fIvalue\fR]...
13 .fi
15 .LP
16 .nf
17 \fBvscanadm\fR \fBget\fR [\fB-p\fR \fIproperty\fR]...
18 .fi
20 .LP
21 .nf
22 \fBvscanadm\fR \fBimport\fR \fB-p\fR \fIproperty\fR \fIfilename\fR
23 .fi
25 .LP
26 .nf
27 \fBvscanadm\fR \fBexport\fR \fB-p\fR \fIproperty\fR \fIfilename\fR
28 .fi
30 .LP
31 .nf
32 \fBvscanadm\fR \fBvalidate\fR \fB-p\fR \fIproperty\fR \fIfilename\fR
33 .fi
35 .LP
36 .nf
37 \fBvscanadm\fR \fBadd-engine\fR [\fB-p\fR \fIproperty\fR=\fIvalue\fR]... \fIengine_id\fR
38 .fi
40 .LP
41 .nf
42 \fBvscanadm\fR \fBremove-engine\fR \fIengine_id\fR
43 .fi
45 .LP
46 .nf
47 \fBvscanadm\fR \fBset-engine\fR \fB-p\fR\fIproperty\fR=\fIvalue\fR [\fB-p\fR \fIproperty\fR=\fIvalue\fR]... \fIengine_id\fR
48 .fi
50 .LP
51 .nf
52 \fBvscanadm\fR \fBget-engine\fR [\fB-p\fR \fIproperty\fR=\fIvalue\fR]... [\fIengine_id\fR]
53 .fi
55 .LP
56 .nf
57 \fBvscanadm\fR \fBshow\fR
58 .fi
60 .LP
61 .nf
62 \fBvscanadm\fR \fBstats\fR [\fB-z\fR]
63 .fi
65 .SH DESCRIPTION
66 .sp
67 .LP
68 The \fBvscanadm\fR command sets and displays properties of the \fBvscan\fR
69 service, \fBvscand\fR(1M), and provides scan statistics.
70 .sp
71 .LP
72 File system exemption from virus scanning may be configured per file system
73 using the appropriate file system administrative command, for example
74 \fBzfs\fR(1M).
75 .sp
76 .LP
77 Scan engines are third-party applications on external hosts that perform the
78 actual virus scanning operation on files. Multiple scan engines can be
79 configured for use by the \fBvscan\fR service. A minimum of two scan engines is
80 recommended. File scan requests are distributed among the configured scan
81 engines to achieve load balancing. A scan engine is identified by its
82 \fIengine_id\fR. The \fIengine_id\fR is a user defined string of up to 64
83 bytes.
84 .sp
85 .LP
86 The \fBvscan\fR service properties are divided into two categories: scan engine
87 properties, which are specific to a scan engine definition, and general
88 properties, which apply to the service and are not scan engine-specific.
89 .SH SUBCOMMANDS
90 .sp
91 .LP
92 \fBvscanadm\fR recognizes the following subcommands:
93 .sp
94 .ne 2
95 .na
96 \fB\fBvscanadm set\fR \fB-p\fR \fIproperty\fR=\fIvalue\fR [\fB-p\fR
97 \fIproperty\fR=\fIvalue\fR]...\fR
98 .ad
99 .sp .6
100 .RS 4n
101 Sets the values of \fBvscan\fR service general properties.
103 .ne 2
105 \fB\fB-p\fR \fIproperty\fR=\fIvalue\fR\fR
107 .RS 21n
108 Specifies a property value
114 .ne 2
116 \fB\fBvscanadm get\fR [\fB-p\fR \fIproperty\fR]...\fR
118 .sp .6
119 .RS 4n
120 Displays the values of \fBvscan\fR service general properties. If no properties
121 are specified, all \fBvscan\fR service general properties are displayed.
123 .ne 2
125 \fB\fB-p\fR \fIproperty\fR\fR
127 .RS 15n
128 Specifies a property value
135 The following properties are available for the \fBvscanadm set\fR and
136 \fBvscanadm get\fR subcommands:
138 .ne 2
140 \fB\fBmax-size\fR\fR
142 .RS 19n
143 The maximum size of files that should be virus scanned. Files exceeding
144 \fImax-size\fR are not scanned. The \fImax-size-action\fR property determines
145 whether access should be allowed or denied to files that exceed \fImax-size\fR.
147 The value of \fImax-size\fR is a string with a numeric (decimal) component and
148 an optional letter component that specifies a unit size, in the format
149 "N[.N][KMGTP][B]".
151 Following the numeric component, the optional unit can be specified as either
152 one or two characters. For example, either "K" or "KB" can be used to specify
153 kilobytes. Unit specifiers are not case-sensitive, and must follow the numeric
154 value immediately with no intervening whitespace.
156 With either no unit specifier, or a unit specifier of only "B", the numeric
157 value is assumed to be in bytes. The default value is 1GB.
159 Note that while the \fBvscan\fR service defines a maximum file size for
160 scanning, scan engines also typically define their own maximum file size
161 setting. It is recommended that \fImax-size\fR be set to a value less than or
162 equal to the maximum file size for the scan engine(s).
166 .ne 2
168 \fB\fBmax-size-action\fR\fR
170 .RS 19n
171 Specifies whether access will be allowed or denied to files larger than
172 \fImax-size\fR. Files larger than \fImax-size\fR are not virus scanned. Valid
173 values are:
175 .ne 2
177 \fBallow\fR
179 .RS 9n
180 allow access to files larger than \fImax-size\fR (no virus scan). This is the
181 default value.
185 .ne 2
187 \fBdeny\fR
189 .RS 9n
190 deny access to files larger than \fImax-size\fR (no virus scan)
196 .ne 2
198 \fB\fBvscanadm import\fR \fB-p\fR \fIproperty\fR \fIfilename\fR\fR
200 .sp .6
201 .RS 4n
202 Imports the property value from the specified file. The file must contain a
203 single line specifying the value of a single property.
207 .ne 2
209 \fB\fBvscanadm export\fR \fB-p\fR \fIproperty\fR \fIfilename\fR\fR
211 .sp .6
212 .RS 4n
213 Exports the property value to the specified file. The file must contain a
214 single line specifying the value of a single property.
218 .ne 2
220 \fB\fBvscanadm validate\fR \fB-p\fR \fIproperty\fR \fIfilename\fR\fR
222 .sp .6
223 .RS 4n
224 Validates the property value in the specified file. The file must contain a
225 single line specifying the value of a single property.
230 The following properties are available for the \fBvscanadm import\fR,
231 \fBvscanadm export\fR, and \fBvscanadm validate\fR subcommands:
233 .ne 2
235 \fB\fBtypes\fR\fR
237 .RS 9n
238 A comma-separated list of file type extension matching rules. This list defines
239 which types of files are scanned and which should be excluded during virus
240 scanning. Each rule comprises the rule indicator [+|-], followed by a file type
241 \fIexpresssion\fR against which a file's type extension is compared. The file
242 type \fIexpresssion\fR is case insensitive and may include the "*" and "?"
243 wildcards. There should be no whitespace between the rule indicator and the
244 file type \fIexpresssion\fR. If a comma is included within the file type
245 expression, it must be escaped using a "\e" (backslash). A file type extension
246 does not include its preceding dot.
248 The rule indicator is a single character and can be one of:
250 .in +2
252 + include file type in virus scanning
253 - exclude file type from virus scanning
255 .in -2
258 When a file is being evaluated as a candidate for virus scanning, its file type
259 will be compared with the rules defined in types. The first rule matched will
260 be applied. If no match is found, the file will be virus scanned. The total
261 length of the types string can not exceed 4096 bytes. The default content of
262 the types list is "+*".
266 .ne 2
268 \fB\fBvscanadm add-engine\fR [\fB-p\fR \fIproperty\fR=\fIvalue\fR]...
269 \fIengine_id\fR\fR
271 .sp .6
272 .RS 4n
273 Adds a new scan engine identified by \fIengine_id\fR. The default values are
274 used for any scan engine properties that are not specified. The hostname
275 defaults to the \fIengine_id\fR.
277 .ne 2
279 \fB\fB-p\fR \fIproperty\fR=\fIvalue\fR\fR
281 .RS 21n
282 Specifies a property value
288 .ne 2
290 \fB\fBvscanadm remove-engine\fR \fIengine_id\fR\fR
292 .sp .6
293 .RS 4n
294 Remove scan engine identified by \fIengine_id\fR, removing all of its
295 configuration property values.
299 .ne 2
301 \fB\fBvscanadm set-engine\fR \fB-p\fR\fIproperty\fR=\fIvalue\fR [\fB-p\fR
302 \fIproperty\fR=\fIvalue\fR]... \fIengine_id\fR\fR
304 .sp .6
305 .RS 4n
306 Creates or updates the configuration property values for the scan engine
307 identified by \fIengine_id\fR.
309 .ne 2
311 \fB\fB-p\fR \fIproperty\fR=\fIvalue\fR\fR
313 .RS 21n
314 Specifies a property value
320 .ne 2
322 \fB\fBvscanadm get-engine\fR [\fB-p\fR \fIproperty\fR=\fIvalue\fR]...
323 [\fIengine_id\fR]\fR
325 .sp .6
326 .RS 4n
327 Displays the values of the specified scan engine properties for the scan engine
328 identified by \fIengine_id\fR. If no \fIengine_id\fR is specified, this
329 subcommand displays the specified scan engine property values for all
330 configured scan engines. If no properties are specified, this subcommand
331 displays all \fBvscan\fR service scan engine properties.
333 .ne 2
335 \fB\fB-p\fR \fIproperty\fR=\fIvalue\fR\fR
337 .RS 21n
338 Specifies a property value
345 The following properties are available for the \fBvscanadm add-engine\fR,
346 \fBvscanadm remove-engine\fR, \fBvscanadm set-engine\fR, and \fBvscanadm
347 get-engine\fR subcommands:
349 .ne 2
351 \fB\fBenable\fR\fR
353 .RS 18n
354 Specifies whether the scan engine is enabled or disabled. Valid values are "on"
355 (enabled) and "off" (disabled). The default is "on" (enabled). A scan engine
356 cannot be enabled if its host property is invalid.
360 .ne 2
362 \fB\fBhost\fR\fR
364 .RS 18n
365 Hostname or \fBIPv4\fR format \fBIP\fR address of the scan engine.
369 .ne 2
371 \fB\fBport\fR\fR
373 .RS 18n
374 \fBICAP\fR port number of the scan engine. The numeric value ranges from 0 to
375 65535. The default \fBICAP\fR port is 1344.
379 .ne 2
381 \fB\fBmax-connection\fR\fR
383 .RS 18n
384 The maximum number of concurrent connections that may be established with a
385 scan engine. The numeric value ranges from 1 to 512. This property defaults to
390 .ne 2
392 \fB\fBvscanadm show\fR\fR
394 .RS 23n
395 Displays the values of all \fBvscan\fR service general properties and scan
396 engine properties.
400 .ne 2
402 \fB\fBvscanadm stats\fR [\fB-z\fR]\fR
404 .RS 23n
405 Displays or resets the following \fBvscan\fR service statistics:
406 .RS +4
408 .ie t \(bu
409 .el o
410 number of files scanned
412 .RS +4
414 .ie t \(bu
415 .el o
416 number of infected files
418 .RS +4
420 .ie t \(bu
421 .el o
422 number of failed scan requests
424 .RS +4
426 .ie t \(bu
427 .el o
428 scan errors (including a per scan engine error count)
431 .ne 2
433 \fB\fB-z\fR\fR
435 .RS 6n
436 Resets \fBvscan\fR service statistics counters to zero
441 .SH EXAMPLES
443 \fBExample 1 \fRSetting the Maximum Size Limit
446 To set the maximum size limit for files to be virus scanned to 128 megabytes,
447 enter
450 .in +2
452 # vscanadm set -p max-size=128M
454 .in -2
458 \fBExample 2 \fRAllowing Access to Files
461 To allow access to files exceeding the maximum file size, enter
464 .in +2
466 # vscanadm set -p max-size-action=allow
468 .in -2
472 \fBExample 3 \fRSetting File Types
475 To set the types so that only files of type "odt", "exe" and "jpg" are virus
476 scanned, enter
479 .in +2
481 # vscanadm set -p types=+odt,+exe,+jpg,-*
483 .in -2
488 To set the types so that all file types except "doc" are virus scanned, enter
491 .in +2
493 # vscanadm set -p types=-doc,+*
495 .in -2
499 \fBExample 4 \fRDisplaying the File Types List
502 To display the file types list, enter
505 .in +2
507 # vscanadm get -p types
509 .in -2
513 \fBExample 5 \fRAdding the Scan Engine
516 To add the scan engine "\fBmy_eng\fR" using the default values, enter
519 .in +2
521 # vscanadm add-engine my_eng
523 .in -2
527 \fBExample 6 \fRDisabling the Scan Engine
530 To disable the scan engine "\fBmy_eng\fR", enter
533 .in +2
535 # vscanadm set-engine -p enable=off my_eng
537 .in -2
541 \fBExample 7 \fRDisplaying Scan Engine Properties
544 To display the properties of the scan engine "\fBmy_eng\fR", enter
547 .in +2
549 # vscanadm get-engine my_eng
551 .in -2
555 \fBExample 8 \fRRemoving Scan Engine
558 To remove the scan engine "\fBmy_eng\fR", enter
561 .in +2
563 # vscanadm remove-engine my_eng
565 .in -2
569 \fBExample 9 \fRDisplaying Vscan Service General and Scan Engine Properties
572 To Display all vscan service general properties and scan engine properties,
573 enter
576 .in +2
578 # vscanadm show
580 .in -2
583 .SH EXIT STATUS
586 The following exit values are returned:
588 .ne 2
590 \fB\fB0\fR\fR
592 .RS 12n
593 Successful completion.
597 .ne 2
599 \fB\fBnon-zero\fR\fR
601 .RS 12n
602 An error occurred.
605 .SH ATTRIBUTES
608 See \fBattributes\fR(5) for descriptions of the following attributes:
613 box;
614 c | c
615 l | l .
616 ATTRIBUTE TYPE  ATTRIBUTE VALUE
618 Interface Stability     Uncommitted
620 Utility output format   Not-An-Interface
623 .SH SEE ALSO
626 \fBvscand\fR(1M), \fBzfs\fR(1M), \fBattributes\fR(5), \fBsmf\fR(5)
627 .SH NOTES
630 All users are permitted to use \fBvscanadm\fR to view \fBvscan\fR properties
631 and statistics. To set property values or reset statistics, the following
632 authorizations are required:
634 .ne 2
636 \fB\fBsolaris.smf.value.vscan\fR\fR
638 .sp .6
639 .RS 4n
640 change the property values or reset statistics
644 .ne 2
646 \fB\fBsolaris.manage.vscan\fR\fR
648 .sp .6
649 .RS 4n
650 refresh the service to apply property value changes
655 To add or remove properties (\fBadd-engine\fR, \fBremove-engine\fR) the
656 following authorizations are required:
658 .ne 2
660 \fB\fBsolaris.smf.modify.application\fR\fR
662 .sp .6
663 .RS 4n
664 add or remove property group
668 .ne 2
670 \fB\fBsolaris.manage.vscan\fR\fR
672 .sp .6
673 .RS 4n
674 refresh the service to apply property value changes
679 All of these authorizations are included in the "\fBVSCAN\fR Management"
680 profile.