LOG FILE PATH NAMES AND CACHE DIRECTORIES
Usage
|
cache_dir Type Maxobjsize Directory-Name Mbytes Level-1 Level2 [..] DISKD : cache_dir diskd Maxobjsize Directory-Name MB L1 L2 Q1 Q2
|
Description
Type specifies the kind of storage system to use. Most everyone will want to use "ufs" as the type. If you are using Async I/O (--enable async-io) on Linux or Solaris, then you may want to try "aufs" as the type. Async IO support may be buggy, however, so beware.
Maxobjsize refers to the max object size this storedir supports. It is used to initially choose the storedir to dump the object. -1 means 'any size'.
'Directory' is a top-level directory where cache swap files will be stored. If you want to use an entire disk for caching, then this can be the mount-point directory. The directory must exist and be writable by the Squid process. Squid will NOT create any directory.
'Mbytes' is the amount of disk space (MB) to use under this directory.
'Level-1' is the number of first-level subdirectories, which will be created under the 'Directory'.
'Level-2' is the number of second-level subdirectories, which will be created under each first-level directory. To create swap directory use /usr/local/squid/bin/squid –z option.
For the diskd type, Q1 specifies the number of unacknowledged I/O requests when Squid stops opening new files. If this many messages are in the queues, Squid won't open new files. Q2 specifies the number of unacknowledged messages when Squid starts blocking. If this many messages are in the queues, Squid blocks until it receives some replies.
Default
|
cache_dir ufs /usr/local/squid/cache 100 16 256
|
Example cache_dir ufs /cache1 5000 16 256 cache_dir ufs /cache2 7000 16 256
Note Can specify multiple cache_dir lines to spread the cache among different disk partitions. Click Here to find more informations on file systems and cache_dir.
|
Usage
|
cache_log Directory-path/filename
|
Description This tag is used to set the path of the Cache logging file. This is where general information about the cache's behaviour goes. Amount of data logged to this file can be increased with the debug_options tag below.
Default
|
cache_log /usr/local/squid/logs/cache.log
|
Example cache_log /var/log/squid_cache.log
Caution Do not change the default value of debug_options unless otherwise needed. Because if debug_options value is high, then logging information goes high. This leads to undesirable growth in log file.
|
Usage
|
cache_store_log Directory-path/filename
|
Description This tag is used to specify the location of the store.log, the file that logs the activities of the storage manager. The file shows which objects are ejected from the cache, and which objects are saved and for how long.
Default
|
cache_store_log /usr/local/squid/logs/store.log
|
Example cache_store_log /var/log/squid_store.log
Caution There are no real utilities to analyze this data. So it is recommended to disable this tag
Note To disable, enter "none" instead of the filename.
|
Usage
|
cache_ swap _log Directory-path/filename
|
Description This tag specifies the location for the cache "swap.log." This log file holds the metadata of objects saved on disk. It is used to rebuild the cache during startup. Normally this file resides in the first 'cache_dir' directory, but you may specify an alternate pathname here. Note, you must give a full filename, not just a directory. Since this is the index for the whole object list you CANNOT periodically rotate it.
If you have more than one 'cache_dir', these swap logs will have names such as:
- cache_swap_log.00
- cache_swap_log.01
- cache_swap_log.02
The numbered extension (which is added automatically) corresponds to the order of the 'cache_dir' lines in this configuration file.
Default
|
cache_ swap _log /usr/local/squid/logs/ swap.log
|
Example cache_ swap _log /var/log/squid_ swap.log
Caution If you change the order of the 'cache_dir' lines in this file, then these log files will NOT correspond to the correct 'cache_dir' entry (unless you manually rename them). We recommend that you do NOT use this option. It is better to keep these log files in each 'cache_dir' directory.
|
Tag Name
|
emulate_httpd_log
|
Usage
|
emulate_httpd_log on|off
|
Description The Cache can emulate the log file format, which many 'httpd' programs use. To disable/enable this emulation, set emulate_httpd_log to 'off' or 'on'.
Default
|
emulate_httpd_log off (By Default Squid Native Log format is used. Since it includes useful information that Squid-specific log analyzers use).
|
Example emulate_httpd_log on
Caution Before setting this to ON, make sure you have httpd_log file analyzers which will analyze log files and give us useful information.
|
Tag Name
|
log_ip_on_direct
|
Usage
|
log_ip_on_direct on|off
|
Description This tag is used to enable/disable logging of the destination IP address in the hierarchy log tag when the cache directs the request to the origin server.
Default
|
log_ip_on_direct on
|
Example log_ip_on_direct off
Note Earlier Squid versions logged the hostname here. If you prefer the old way, set this to off.
|
Usage
|
mime_table Directory-Path/filename
|
Description This tag is used to set the pathname to Squid's MIME table. This file contains Squid's supported mime types.
Default
|
mime_table /usr/local/squid/etc/mime.conf
|
Caution Shouldn't need to change this, but the default file contains examples and formatting information if done.
|
Usage
|
log_mime_hdrs on|off
|
Description The Cache can record both the request and the response MIME headers for each HTTP transaction. The headers are encoded safely and will appear as two bracketed fields at the end of the access log (for either the native or httpd-emulated log formats). To enable this logging, set log_mime_hdrs to 'on'.
Default
|
log_mime_hdrs off
|
|
Usage
|
useragent_log Directory-path/filename
|
Description If configured with the "--enable-useragent_log" configure option, Squid will write the User-Agent field from HTTP requests to the filename specified here.
Default
|
useragent_log none (By default useragent_log is disabled.)
|
Example useragent_log /var/log/useragent.log
|
Usage
|
referer_log Directory-path/filename
|
Description If configured with the "--enable-referer_log" configure option, Squid will write the Referer field from HTTP requests to the filename specified here.
Default
|
referer_log none (By default referer_log is disabled.)
|
Example referer_log /var/log/referer.log
|
Usage
|
pid_filename Directory-path/filename
|
Description This tag specifies the location of the file in which Squid writes its process-ids.
Default
|
pid_filename /usr/local/squid/logs/squid.pid
|
Example pid_filename /var/lock/squid.pid
Caution To disable, enter "none".
|
Usage
|
debug_options section, level
|
Description Logging options are set as section, level, where each source file is assigned a unique section. Lower levels result in less output. The magic word "ALL" sets debugging levels for all sections. We recommend normally running with "ALL, 1".
Default
|
debug_options ALL, 1
|
Example debug_options ALL, 9
Caution Full debugging (level 9) can result in a very large log file, so be careful. Normally, running with "ALL, 1" is recommended.
|
Description This tag can be set to ON, if you wish to log fully qualified domain names in the access.log.
Example log_fqdn on
Caution To do this, Squid does a DNS lookup of all IP's connecting to it. This can (in some situations) increase latency, which makes your cache seem slower for interactive browsing.
|
Usage
|
client_netmask NETMASK
|
Description A netmask for client addresses in log files and cachemgr output. Change this to protect the privacy of your cache clients. A netmaskof 255.255.255.0 will log all IP's in that range with the last digit set to '0'.
Default
|
client_netmask 255.255.255.255
|
Example client_netmask 255.255.255.0
Caution When you enable this tag, then the client's visit pages cannot be identified.
|
|