Saturday, June 4, 2011

Log File Path Names And Cache Directories



cache_dir
cache_dir Type Maxobjsize Directory-Name Mbytes Level-1 Level2
cache_dir ufs /usr/local/squid/cache 100 16 256

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.




cache_access_log
cache_access_log Directory-path/filename
cache_access_log /usr/local/squid/logs/access.log

This tag is used to specify the path of the access.log file, which logs the client request activity.




cache_log
cache_log Directory-path/filename
cache_log /usr/local/squid/logs/cache.log

This tag is used to set the path of the Cache logging file.




cache_store_log
cache_store_log Directory-path/filename
cache_store_log /usr/local/squid/logs/store.log

This tag is used to specify the location of the store.log, the file that logs the activities of the storage manager.




cache_swap_log
cache_ swap _log Directory-path/filename
cache_ swap _log /usr/local/squid/logs/ swap.log

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.

No comments:

Post a Comment