~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to docs/html/node26.html

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8
8
<HTML>
9
9
<HEAD>
10
 
<TITLE>Clam daemon</TITLE>
11
 
<META NAME="description" CONTENT="Clam daemon">
 
10
<TITLE>ClamAV Active Malware Report</TITLE>
 
11
<META NAME="description" CONTENT="ClamAV Active Malware Report">
12
12
<META NAME="keywords" CONTENT="clamdoc">
13
13
<META NAME="resource-type" CONTENT="document">
14
14
<META NAME="distribution" CONTENT="global">
18
18
 
19
19
<LINK REL="STYLESHEET" HREF="clamdoc.css">
20
20
 
21
 
<LINK REL="next" HREF="node27.html">
22
 
<LINK REL="previous" HREF="node25.html">
23
 
<LINK REL="up" HREF="node25.html">
 
21
<LINK REL="previous" HREF="node24.html">
 
22
<LINK REL="up" HREF="node19.html">
24
23
<LINK REL="next" HREF="node27.html">
25
24
</HEAD>
26
25
 
27
26
<BODY >
28
27
 
29
28
<DIV CLASS="navigation"><!--Navigation Panel-->
30
 
<A NAME="tex2html537"
 
29
<A NAME="tex2html535"
31
30
  HREF="node27.html">
32
31
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
33
 
<A NAME="tex2html533"
34
 
  HREF="node25.html">
 
32
<A NAME="tex2html531"
 
33
  HREF="node19.html">
35
34
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
36
35
<A NAME="tex2html527"
37
36
  HREF="node25.html">
38
37
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
39
 
<A NAME="tex2html535"
 
38
<A NAME="tex2html533"
40
39
  HREF="node1.html">
41
40
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
42
41
<BR>
43
 
<B> Next:</B> <A NAME="tex2html538"
44
 
  HREF="node27.html">Clamdscan</A>
45
 
<B> Up:</B> <A NAME="tex2html534"
46
 
  HREF="node25.html">Usage</A>
 
42
<B> Next:</B> <A NAME="tex2html536"
 
43
  HREF="node27.html">Usage</A>
 
44
<B> Up:</B> <A NAME="tex2html532"
 
45
  HREF="node19.html">Configuration</A>
47
46
<B> Previous:</B> <A NAME="tex2html528"
48
 
  HREF="node25.html">Usage</A>
49
 
 &nbsp; <B>  <A NAME="tex2html536"
 
47
  HREF="node25.html">Closest mirrors</A>
 
48
 &nbsp; <B>  <A NAME="tex2html534"
50
49
  HREF="node1.html">Contents</A></B> 
51
50
<BR>
52
51
<BR></DIV>
53
52
<!--End of Navigation Panel-->
54
53
 
55
 
<H2><A NAME="SECTION00061000000000000000"></A><A NAME="clamd"></A>
56
 
<BR>
57
 
Clam daemon
 
54
<H2><A NAME="SECTION00055000000000000000">
 
55
ClamAV Active Malware Report</A>
58
56
</H2>
59
 
    <code>clamd</code> is a multi-threaded daemon that uses <SPAN  CLASS="textit">libclamav</SPAN>
60
 
    to scan files for viruses. It may work in one or both modes listening on:
61
 
    
62
 
<UL>
63
 
<LI>Unix (local) socket
64
 
</LI>
65
 
<LI>TCP socket
66
 
    
67
 
</LI>
68
 
</UL>
69
 
    The daemon is fully configurable via the <code>clamd.conf</code> file
70
 
    <A NAME="tex2html18"
71
 
  HREF="footnode.html#foot227"><SUP><SPAN CLASS="arabic">6</SPAN></SUP></A>. <code>clamd</code> recognizes the following commands:
72
 
    
73
 
<UL>
74
 
<LI><SPAN  CLASS="textbf">PING</SPAN>
75
 
<BR>
76
 
Check the daemon's state (should reply with "PONG").
77
 
</LI>
78
 
<LI><SPAN  CLASS="textbf">VERSION</SPAN>
79
 
<BR>
80
 
Print program and database versions.
81
 
</LI>
82
 
<LI><SPAN  CLASS="textbf">RELOAD</SPAN>
83
 
<BR>
84
 
Reload the databases.
85
 
</LI>
86
 
<LI><SPAN  CLASS="textbf">SHUTDOWN</SPAN>
87
 
<BR>
88
 
Perform a clean exit.
89
 
</LI>
90
 
<LI><SPAN  CLASS="textbf">SCAN file/directory</SPAN>
91
 
<BR>
92
 
Scan file or directory (recursively) with archive support
93
 
            enabled (a full path is required).
94
 
</LI>
95
 
<LI><SPAN  CLASS="textbf">RAWSCAN file/directory</SPAN>
96
 
<BR>
97
 
Scan file or directory (recursively) with archive and special file
98
 
            support disabled (a full path is required).
99
 
</LI>
100
 
<LI><SPAN  CLASS="textbf">CONTSCAN file/directory</SPAN>
101
 
<BR>
102
 
Scan file or directory (recursively) with archive support
103
 
            enabled and don't stop the scanning when a virus is found.
104
 
</LI>
105
 
<LI><SPAN  CLASS="textbf">MULTISCAN file/directory</SPAN>
106
 
<BR>
107
 
Scan file in a standard way or scan directory (recursively) using
108
 
            multiple threads (to make the scanning faster on SMP machines).
109
 
</LI>
110
 
<LI><SPAN  CLASS="textbf">INSTREAM</SPAN>
111
 
<BR>        <SPAN  CLASS="textit">It is mandatory to prefix this command with <SPAN  CLASS="textbf">n</SPAN> or
112
 
            <SPAN  CLASS="textbf">z</SPAN>.</SPAN>
113
 
<BR>
114
 
Scan a stream of data. The stream is sent to clamd in chunks,
115
 
            after INSTREAM, on the same socket on which the command
116
 
            was sent. This avoids the overhead of establishing new TCP
117
 
            connections and problems with NAT. The format of the chunk is:
118
 
            <code>&lt;length&gt;&lt;data&gt;</code> where <code>&lt;length&gt;</code> is the size of the
119
 
            following data in bytes expressed as a 4 byte unsigned integer in
120
 
            network byte order and <code>&lt;data&gt;</code> is the actual chunk. Streaming
121
 
            is terminated by sending a zero-length chunk. Note: do not exceed
122
 
            StreamMaxLength as defined in clamd.conf, otherwise clamd will
123
 
            reply with <SPAN  CLASS="textit">INSTREAM size limit exceeded</SPAN> and close the
124
 
            connection.
125
 
</LI>
126
 
<LI><SPAN  CLASS="textbf">FILDES</SPAN>
127
 
<BR>        <SPAN  CLASS="textit">It is mandatory to newline terminate this command, or prefix
128
 
            with <SPAN  CLASS="textbf">n</SPAN> or <SPAN  CLASS="textbf">z</SPAN>. This command only works on UNIX
129
 
            domain sockets.</SPAN>
130
 
<BR>
131
 
Scan a file descriptor. After issuing a FILDES command a subsequent
132
 
            rfc2292/bsd4.4 style packet (with at least one dummy character) is
133
 
            sent to clamd carrying the file descriptor to be scanned inside the
134
 
            ancillary data. Alternatively the file descriptor may be sent in
135
 
            the same packet, including the extra character.
136
 
</LI>
137
 
<LI><SPAN  CLASS="textbf">STATS</SPAN>
138
 
<BR>        <SPAN  CLASS="textit">It is mandatory to newline terminate this command, or prefix
139
 
            with <SPAN  CLASS="textbf">n</SPAN> or <SPAN  CLASS="textbf">z</SPAN>, it is recommended to only use the
140
 
            <SPAN  CLASS="textbf">z</SPAN> prefix.</SPAN>
141
 
<BR>
142
 
On this command clamd provides statistics about the scan queue,
143
 
            contents of scan queue, and memory usage. The exact reply format is
144
 
            subject to changes in future releases.
145
 
</LI>
146
 
<LI><SPAN  CLASS="textbf">IDSESSION, END</SPAN>
147
 
<BR>        <SPAN  CLASS="textit">It is mandatory to prefix this command with <SPAN  CLASS="textbf">n</SPAN> or
148
 
            <SPAN  CLASS="textbf">z</SPAN>, also all commands inside <SPAN  CLASS="textbf">IDSESSION</SPAN> must be
149
 
            prefixed.</SPAN>
150
 
<BR>
151
 
Start/end a clamd session. Within a session multiple
152
 
            SCAN, INSTREAM, FILDES, VERSION, STATS commands can be sent on the
153
 
            same socket without opening new connections. Replies from clamd
154
 
            will be in the form <code>&lt;id&gt;: &lt;response&gt;</code> where <code>&lt;id&gt;</code> is
155
 
            the request number (in ASCII, starting from 1) and <code>&lt;response&gt;</code>
156
 
            is the usual clamd reply. The reply lines have the same delimiter
157
 
            as the corresponding command had. Clamd will process the commands
158
 
            asynchronously, and reply as soon as it has finished processing.
159
 
            Clamd requires clients to read all the replies it sent, before
160
 
            sending more commands to prevent send() deadlocks. The recommended
161
 
            way to implement a client that uses IDSESSION is with non-blocking
162
 
            sockets, and a select()/poll() loop: whenever send would block,
163
 
            sleep in select/poll until either you can write more data, or read
164
 
            more replies. <SPAN  CLASS="textit">Note that using non-blocking sockets without
165
 
            the select/poll loop and alternating recv()/send() doesn't comply
166
 
            with clamd's requirements.</SPAN> If clamd detects that a client has
167
 
            deadlocked, it will close the connection. Note that clamd may
168
 
            close an IDSESSION connection too if the client doesn't follow the
169
 
            protocol's requirements.
170
 
</LI>
171
 
<LI><SPAN  CLASS="textbf">STREAM</SPAN> (deprecated, use <SPAN  CLASS="textbf">INSTREAM</SPAN> instead)
172
 
<BR>
173
 
Scan stream: clamd will return a new port number you should
174
 
            connect to and send data to scan.
175
 
    
176
 
</LI>
177
 
</UL>
178
 
    It's recommended to prefix clamd commands with the letter <SPAN  CLASS="textbf">z</SPAN>
179
 
    (eg. zSCAN) to indicate that the command will be delimited by a NULL
180
 
    character and that clamd should continue reading command data until a NULL
181
 
    character is read. The null delimiter assures that the complete command
182
 
    and its entire argument will be processed as a single command. Alternatively
183
 
    commands may be prefixed with the letter <SPAN  CLASS="textbf">n</SPAN> (e.g. nSCAN) to use
184
 
    a newline character as the delimiter. Clamd replies will honour the
185
 
    requested terminator in turn. If clamd doesn't recognize the command, or
186
 
    the command doesn't follow the requirements specified below, it will reply
187
 
    with an error message, and close the connection.
188
 
    
189
 
    Clamd can handle the following signals:
190
 
    
191
 
<UL>
192
 
<LI><SPAN  CLASS="textbf">SIGTERM</SPAN> - perform a clean exit
193
 
</LI>
194
 
<LI><SPAN  CLASS="textbf">SIGHUP</SPAN> - reopen the log file
195
 
</LI>
196
 
<LI><SPAN  CLASS="textbf">SIGUSR2</SPAN> - reload the database
197
 
    
198
 
</LI>
199
 
</UL>
200
 
    Clamd should not be started in the background using the shell operator
201
 
    <code>&amp;</code> or external tools. Instead, you should run and wait for clamd
202
 
    to load the database and daemonize itself. After that, clamd is instantly
203
 
    ready to accept connections and perform file scanning.
 
57
 
 
58
<P>
 
59
The ClamAV Active Malware Report that was introduced in ClamAV 0.94.1 uses
 
60
    freshclam to send summary data to our server about the malware that has
 
61
    been detected. This data is then used to generate real-time reports on
 
62
    active malware. These reports, along with geographical and historic trends,
 
63
    will be published on <TT><A NAME="tex2html21"
 
64
  HREF="http://www.clamav.net/">http://www.clamav.net/</A></TT>.
 
65
 
 
66
<P>
 
67
The more data that we receive from ClamAV users, the more reports, and the
 
68
    better the quality of the reports, will be. To enable the submission of
 
69
    data to us for use in the Active Malware Report, enable
 
70
    SubmitDetectionStats in freshclam.conf, and LogTime and LogFile in
 
71
    clamd.conf. You should only enable this feature if you're running clamd
 
72
    to scan incoming data in your environment.
 
73
 
 
74
<P>
 
75
The only private data that is transferred is an IP address, which is used
 
76
    to create the geographical data. The size of the data that is sent is small;
 
77
    it contains just the filename, malware name and time of detection. The data
 
78
    is sent in sets of 10 records, up to 50 records per session. For example,
 
79
    if you have 45 new records, then freshclam will submit 40; if 78 then it
 
80
    will submit the latest 50 entries; and if you have 9 records no statistics
 
81
    will be sent.
204
82
 
205
83
<P>
206
84
 
207
85
<DIV CLASS="navigation"><HR>
208
86
<!--Navigation Panel-->
209
 
<A NAME="tex2html537"
 
87
<A NAME="tex2html535"
210
88
  HREF="node27.html">
211
89
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
212
 
<A NAME="tex2html533"
213
 
  HREF="node25.html">
 
90
<A NAME="tex2html531"
 
91
  HREF="node19.html">
214
92
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
215
93
<A NAME="tex2html527"
216
94
  HREF="node25.html">
217
95
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
218
 
<A NAME="tex2html535"
 
96
<A NAME="tex2html533"
219
97
  HREF="node1.html">
220
98
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
221
99
<BR>
222
 
<B> Next:</B> <A NAME="tex2html538"
223
 
  HREF="node27.html">Clamdscan</A>
224
 
<B> Up:</B> <A NAME="tex2html534"
225
 
  HREF="node25.html">Usage</A>
 
100
<B> Next:</B> <A NAME="tex2html536"
 
101
  HREF="node27.html">Usage</A>
 
102
<B> Up:</B> <A NAME="tex2html532"
 
103
  HREF="node19.html">Configuration</A>
226
104
<B> Previous:</B> <A NAME="tex2html528"
227
 
  HREF="node25.html">Usage</A>
228
 
 &nbsp; <B>  <A NAME="tex2html536"
 
105
  HREF="node25.html">Closest mirrors</A>
 
106
 &nbsp; <B>  <A NAME="tex2html534"
229
107
  HREF="node1.html">Contents</A></B> </DIV>
230
108
<!--End of Navigation Panel-->
231
109
<ADDRESS>
232
110
Tomasz Kojm
233
 
2009-10-28
 
111
2010-03-10
234
112
</ADDRESS>
235
113
</BODY>
236
114
</HTML>