[clamav-users] clamdscan: Output detailed scan results to STDOUT or to configurable file?
An Schall
an.schall at gmail.com
Mon Feb 21 10:30:48 UTC 2022
Yes, I am using exactly this approach at the moment. However, I
execute clamdscan from within a custom bash script. This bash script
logs several messages to a defined log file. As part of this
information the verbose clamdscan logs should also be captured in this
log file.
With clamscan it was easy to simply pipe the verbose output to tee and
append the custom log file. Now I have to use "cat" and it seems like
this introduces some error.
Am Mo., 21. Feb. 2022 um 11:23 Uhr schrieb G.W. Haywood via
clamav-users <clamav-users at lists.clamav.net>:
>
> Hi there,
>
> On Mon, 21 Feb 2022, An Schall via clamav-users wrote:
>
> > Thanks for the response. The main reason why I use clamdscan is
> > performance: I need to scan in a multi-threaded manner (in contrast to
> > clamscan). I guess using 'find' will go against this aim.
>
> It was just one suggestion. If you have a utility capable of handling
> more load, then the system utilities are capable of loading it more.
>
> > Ok, I guess this answers the questions that there is no built-in
> > support for verbose logging in clamdscan.
>
> 8<----------------------------------------------------------------------
> # grep Verbose /etc/mail/clamav/clamd_tcp3.conf
> LogVerbose yes
> 8<----------------------------------------------------------------------
> $ clamdscan -v hexdump_formats/
> /home/ged/hexdump_formats: OK
>
> ----------- SCAN SUMMARY -----------
> Infected files: 0
> Time: 0.847 sec (0 m 0 s)
> Start Date: 2022:02:21 10:17:34
> End Date: 2022:02:21 10:17:35
> 8<----------------------------------------------------------------------
> # tail -n20 /var/log/clamav.log
> Mon Feb 21 10:17:34 2022 -> Received POLLIN|POLLHUP on fd 5
> Mon Feb 21 10:17:34 2022 -> Got new connection, FD 10
> Mon Feb 21 10:17:34 2022 -> Received POLLIN|POLLHUP on fd 6
> Mon Feb 21 10:17:34 2022 -> fds_poll_recv: timeout after 30 seconds
> Mon Feb 21 10:17:34 2022 -> Received POLLIN|POLLHUP on fd 10
> Mon Feb 21 10:17:34 2022 -> got command CONTSCAN /home/ged/hexdump_formats (35, 7), argument: /home/ged/hexdump_formats
> Mon Feb 21 10:17:34 2022 -> mode -> MODE_WAITREPLY
> Mon Feb 21 10:17:34 2022 -> Breaking command loop, mode is no longer MODE_COMMAND
> Mon Feb 21 10:17:35 2022 -> Consumed entire command
> Mon Feb 21 10:17:35 2022 -> Number of file descriptors polled: 1 fds
> Mon Feb 21 10:17:35 2022 -> fds_poll_recv: timeout after 9996 seconds
> Mon Feb 21 10:17:35 2022 -> THRMGR: queue (single) crossed low threshold -> signaling
> Mon Feb 21 10:17:35 2022 -> THRMGR: queue (bulk) crossed low threshold -> signaling
> Mon Feb 21 10:17:35 2022 -> /home/ged/hexdump_formats/format_64.spec_for_hexdump: OK
> Mon Feb 21 10:17:35 2022 -> /home/ged/hexdump_formats/format_16.spec_for_hexdump: OK
> Mon Feb 21 10:17:35 2022 -> Finished scanthread
> Mon Feb 21 10:17:35 2022 -> Scanthread: connection shut down (FD 10)
> Mon Feb 21 10:17:35 2022 -> THRMGR: queue (single) crossed low threshold -> signaling
> Mon Feb 21 10:17:35 2022 -> THRMGR: queue (bulk) crossed low threshold -> signaling
> 8<----------------------------------------------------------------------
>
> ?
>
> --
>
> 73,
> Ged.
>
> _______________________________________________
>
> clamav-users mailing list
> clamav-users at lists.clamav.net
> https://lists.clamav.net/mailman/listinfo/clamav-users
>
>
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
>
> http://www.clamav.net/contact.html#ml
More information about the clamav-users
mailing list