傻瓜No.1(口水熊)

上善若水。水善利萬物而不爭,處眾人之所惡,故幾於道。居善地,心善淵,與善仁,言善信,正善治,事善能,動善時。夫唯不爭,故無尤。

导航

Squid 2.6 Configuration Manual - Log File Path Names and Cache Directories

LOG FILE PATH NAMES AND CACHE DIRECTORIES
日志文件路径名称及缓存目录

Squid provides a number of logs that can be used when debugging problems, and when measuring the effectiveness and identifying users and the sites they visit. Because Squid can be used to "snoop" on users browsing habits, one should carefully consider privacy laws in your region and more importantly be considerate to your users. That's being said, logs can be very valuable tools in insuring that your users get the best service possible from your cache.

Squid提供大量的日志,在调试程序、评估效率、鉴别用户和他们所访问站点的时候都可以被用到。因为在用户的浏览习惯上,Squid可以被用做“窥探”,任何人都应该谨慎考虑隐私方面的法律法规在您所在的区域,并且最重要的是为您的客户做到深思熟虑。那即是说,日志在确保您的用户从您的缓存中获取得最好的服务时候,可以是非常具体价值的工具。

cache_dir logformat access_log cache_log cache_store_log
cache_swap_log emulate_httpd_log log_ip_on_direct mime_table log_mime_hdrs
useragent_log referer_log pid_filename debug_options log_fqdn
client_netmask        

TAG NAME
标签名称
cache_dir
Description
描述
This is used to define cache directory, its path, type and size
用于定义缓存目录,它的路径、类型及大小
Build Option
编译选项
Default
默认
Usage
用法
cache_dir Type Directory-Name FS-specfic-data [options] 
Default
默认值
 

Synopsis
摘要

All objects which are to be cached are stored in the disk space defined by this tag. This defines the path to cache directory, cache directory name, type and size of the cache area.

要缓存的所有对象被存储在此标签所定义的磁盘空间中。定义了到缓存目录的路径、缓存名称、类型以及缓存区域的大小。

Arguments
参数

Type

Type specifies the kind of storage system to use. Only "ufs" is built by default. To enable any of the other storage systems see the --enable-storeio configure option.
Type指定了使用存储系统的类型。仅“ufs”被默认创建。欲启用其它任意的存储系统,请查看 --enable-storeio 配置选项。

Type is one of the following:
Type可以是下列之一:

  1. ufs is the old well-known Squid storage format that has always been there.
    usf - 一直都存在的,旧有的众所周知的Squid存储格式。
  2. aufs uses the same storage format as ufs, utilizing POSIX-threads to avoid blocking the main Squid process on disk-I/O.This was formerly known in Squid as async-io.
    aufs - 使用跟usf一样的存储格式,利用POSIX线程来避免在磁盘I/O操作时妨碍主要的Squid进程。在Squid中做为同步IO,它曾是相当知名的。
  3. diskd uses the same storage format as ufs, utilizing a separate process to avoid blocking the main Squid process on disk-I/O.
    diskd - 使用跟usf一样的存储格式,利用一个独立的进程来避免在磁盘I/O操作时妨碍主要的Squid进程。
Type
 Usage
ufs  cache_dir ufs Directory-Name Mbytes L1 L2 [options]
aufs  cache_dir aufs Directory-Name Mbytes L1 L2 [options]s
diskd  cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
COSS
 
Directory-Name Directory name 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 this directory for you.
Directory name目录名称是一个顶层目录,缓存交换文件将被存放在此处。如果你需要使用整个磁盘来缓冲的话,那么它也可以是个挂载点目录。该目录必须存在而且Squid进程对其可写。Squid将不会为您创建此目录。
Mbytes  Mbytes is the amount of disk space (in MB) to use under this directory. The default is 100 MB. Change this to suit your configuration.
Mbytes指的是用在此目录的所有磁盘空间的总和
Level1
 Number of first-level subdirectories which will be created under the Directory. The default is 16.
将要在此目录下创建首层子目录的数量。默认值为16。
Level2
 number of second-level subdirectories which will be created under each first-level directory. The default is 256.
将要在每个首层子目录下创建的第二层子目录数量。默认值为256。
Q1
 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. Default is 64.
在Squid停止新文件的打开时,未响应的I/O请求数量。如果有大量信息在队列中,Squid装无法打开新文件。默认值为64。
Q2
 number of unacknowledged messages when Squid starts blocking. If this many messages are in the queues, Squid blocks until it receives some replies.
在Squid开始阻塞时,未响应的信息数量。如果有大量信息在队列中,Squid将阻塞直到它收到某些回复信息。

Option:
选项:

read-only Make the cache directory as read only.
使缓存目录只读。
max-size=n refers to the max object size this storedir supports. It is used to initially choose the storedir to dump the object.
指定该存储目录支持的最大对象大小。常用于最开始时选择存储目录去转储对象。


Example(s)
实例

Cache_dir ufs /path/to/cache_dir 5000 16 256

posted on 2007-09-11 22:59  熊喜怀  阅读(445)  评论(0编辑  收藏  举报