Menu

faqcicap

chtsanti

FAQ

c-icap

Q. How to reload c-icap configuration?

You can use the following command:

# echo -n "reconfigure" > /var/run/c-icap.ctl

The above command will cause c-icap to reload configuration, re-initialize services and modules and re-open log files

Q. How can I get some c-icap runtime statistics?

The command:

# echo -n "dump_statistics" > /var/run/c-icap.ctl

Will cause c-icap to dump statistics to the server.log file

To get runtime statistics from command line use the build-in c-icap info service:

# c-icap-client -s "info?view=text" -h localhost  -req use-any-url

Also someone can setup his/her squid to get c-icap statistics from the web:

squid-3.0 configuration:

acl infoaccess dstdomain icap.info
#
icap_service service_info reqmod_precache 1 icap://192.168.1.2:1344/info
icap_class class_icapinfo service_info
icap_access class_icapinfo allow infoaccess
icap_access class_icapinfo deny all

squid-3.1 and later configuration:

acl infoaccess dstdomain icap.info
#
icap_service service_info reqmod_precache 1 icap://192.168.1.2:1344/info
adaptation_service_set class_info service_info
adaptation_access class_info allow infoaccess
adaptation_access class_info deny all

To view c-icap statistics use the http://icap.info url in your browser

Q. How to force to log to syslog

Use:

Module logger sys_logger.so
Logger sys_logger

Read the manual for sys_logger configuration options.

c-icap-modules

Q. How can I log detected viruses in my access logs?

You can use the %{virus_scan:virus}Sa log formating code. For example:

LogFormat viruslog "%tl, %>a %im %iu %is %{virus_scan:virus}Sa"
AccessLog /var/log/access-viruses.log viruslog

Q. How to reload virus patterns?

For the c-icap-modules-0.3.x and later releases in the case you are using the libclamav module (clamav_mod module):

# echo -n  "clamav:dbreload" > /var/run/c-icap.ctl

For c-icap-module-0.2.x and earlier releases you can use the following:

# echo -n  "srv_clamav:dbreload" > /var/run/c-icap.ctl

The above command will cause the c-icap process to reload the clamav database

Also reloading c-icap reconfiguration will cause the c-icap server to reload the clamav database:

# echo -n "reconfigure" > /var/run/c-icap.ctl

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.