设为首页 收藏本站
查看: 1204|回复: 0

[经验分享] Squid 2.6 Configuration Manual

[复制链接]

尚未签到

发表于 2015-9-3 08:49:38 | 显示全部楼层 |阅读模式
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_dirlogformataccess_log cache_log cache_store_log
cache_swap_log emulate_httpd_loglog_ip_on_direct mime_table log_mime_hdrs
useragent_log referer_log pid_filename debug_options log_fqdn
client_netmask         

TAG NAME
标签名称cache_dirDescription
描述
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可以是下列之一:

  • ufs is the old well-known Squid storage format that has always been there.
    usf - 一直都存在的,旧有的众所周知的Squid存储格式。
  • 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,它曾是相当知名的。
  • 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-NameDirectory 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-onlyMake the cache directory as read only.
使缓存目录只读。
max-size=nrefers 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

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-108895-1-1.html 上篇帖子: squid: ERROR: No running copy 下篇帖子: squid cache_dir参数详解
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表