{"id":1134,"date":"2011-11-09T14:07:00","date_gmt":"2011-11-09T06:07:00","guid":{"rendered":"\/?p=1134"},"modified":"2011-11-09T14:07:00","modified_gmt":"2011-11-09T14:07:00","slug":"1134","status":"publish","type":"post","link":"https:\/\/blog.vimge.com\/archives\/architecture\/1134.html","title":{"rendered":"Varnishlog \u4e2d\u6587man page"},"content":{"rendered":"

<\/p>\n

\n
Author:    Dag-Erling Sm?rgrav<\/span><\/div>\n
Author:    Per Buer<\/span><\/div>\n
Date:        2010-05-31<\/span><\/div>\n
Version:   0.2<\/span><\/div>\n
Manual section:       1<\/span><\/div>\n
Display varnish logs<\/span><\/div>\n
 <\/span><\/div>\n
SYNOPSIS<\/span><\/div>\n
varnishlog [-a] [-b] [-C] [-c] [-D] [-d] [-I regex] [-i tag] [-k keep] [-n varnish_name] [-o] [-P     file] [-r file] [-s num] [-u] [-V] [-w file] [-X regex] [-x tag] [tag regex]<\/span><\/div>\n
DESCRIPTION<\/span><\/div>\n
         varnishlog\u5de5\u5177\u8bfb\u53d6\u548c\u663e\u793a\u5171\u4eab\u5185\u5b58\u7684\u65e5\u5fd7\u3002<\/span><\/div>\n
         \u4e0b\u9762\u7684\u9009\u9879\u662f\u53ef\u7528\u7684\uff1a<\/span><\/div>\n
                   -a               \u5f53\u628a\u65e5\u5fd7\u5199\u5230\u6587\u4ef6\u91cc\u65f6\uff0c\u4f7f\u7528\u9644\u52a0\uff0c\u800c\u4e0d\u662f\u8986\u76d6\u3002<\/span><\/div>\n
                   -b               \u53ea\u663e\u793avarnishd\u548c\u540e\u7aef\u670d\u52a1\u5668\u7684\u65e5\u5fd7\u3002<\/span><\/div>\n
                   -C               \u5339\u914d\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u65f6\u5019\uff0c\u5ffd\u7565\u5927\u5c0f\u5199\u5dee\u5f02\u3002<\/span><\/div>\n
                   -c               \u53ea\u663e\u793avarnishd\u548c\u5ba2\u6237\u7aef\u7684\u65e5\u5fd7\u3002<\/span><\/div>\n
                   -D              \u4ee5\u8fdb\u7a0b\u65b9\u5f0f\u8fd0\u884c<\/span><\/div>\n
                   -d               \u5728\u542f\u52a8\u8fc7\u7a0b\u4e2d\u5904\u7406\u65e7\u7684\u65e5\u5fd7\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0cvarnishhist\u53ea\u4f1a\u5728\u8fdb\u7a0b\u5199\u5165\u65e5 \u5fd7\u540e\u542f\u52a8\u3002<\/span><\/div>\n
                   -I       regex        \u5339\u914d\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u65e5\u5fd7\uff0c\u5982\u679c\u6ca1\u6709\u4f7f\u7528-i\u6216\u8005-I\uff0c\u90a3\u4e48\u6240\u6709\u7684\u65e5\u5fd7\u90fd\u4f1a\u5339\u914d\u3002<\/span><\/div>\n
                   -i       tag            \u5339\u914d\u6307\u5b9a\u7684tag\uff0c\u5982\u679c\u6ca1\u6709\u4f7f\u7528-i\u6216\u8005-I\uff0c\u90a3\u4e48\u6240\u6709\u7684\u65e5\u5fd7\u90fd\u4f1a\u88ab\u5339\u914d\u3002<\/span><\/div>\n
                   -k      num          \u53ea\u663e\u793a\u5f00\u59cb\u7684num\u4e2a\u65e5\u5fd7\u8bb0\u5f55\u3002<\/span><\/div>\n
                   -n               \u6307\u5b9avarnish\u5b9e\u4f8b\u7684\u540d\u5b57\uff0c\u7528\u6765\u83b7\u53d6\u65e5\u5fd7\uff0c\u5982\u679c\u6ca1\u6709\u6307\u5b9a\uff0c\u9ed8\u8ba4\u4f7f\u7528\u4e3b\u673a\u540d\u3002<\/span><\/div>\n
                   -o               \u4ee5\u8bf7\u6c42ID\u7ed9\u65e5\u5fd7\u5206\u7ec4\uff0c\u8fd9\u4e2a\u529f\u80fd\u6ca1\u591a\u5927\u7528\u3002\u5982\u679c\u8981\u5199\u5230\u4e00\u4e2a\u6587\u4ef6\u91cc\u4f7f\u7528  -w\u9009\u9879\u3002<\/span><\/div>\n
                   -P      file    \u8bb0\u5f55PID\u53f7\u7684\u6587\u4ef6<\/span><\/div>\n
                   -r      file    \u4ece\u4e00\u4e2a\u6587\u4ef6\u8bfb\u53d6\u65e5\u5fd7\uff0c\u800c\u4e0d\u662f\u4ece\u5171\u4eab\u5185\u5b58\u8bfb\u53d6\u3002<\/span><\/div>\n
                   -s               sum \u8df3\u8fc7\u5f00\u59cb\u7684num\u6761\u65e5\u5fd7\u3002<\/span><\/div>\n
                   -u               \u65e0\u7f13\u51b2\u7684\u8f93\u51fa\u3002<\/span><\/div>\n
                   -V               \u663e\u793a\u7248\u672c\uff0c\u7136\u540e\u9000\u51fa\u3002<\/span><\/div>\n
                   -w     file    \u628a\u65e5\u5fd7\u5199\u5230\u4e00\u4e2a\u6587\u4ef6\u91cc\u4ee3\u66ff\u663e\u793a\u4ed6\u4eec\uff0c\u5982\u679c\u4e0d\u662f\u7528-a\u53c2\u6570\u5c31\u4f1a\u53d1\u751f\u8986\u76d6\uff0c\u5982\u679cvarnishlog\u5728\u5199\u65e5\u5fd7\u65f6\uff0c\u63a5\u6536\u5230\u4e00\u4e2aSIGHUP\u4fe1\u53f7\uff0c\u4ed6\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\uff0c\u8001\u7684\u6587\u4ef6\u53ef\u4ee5\u79fb\u8d70\u3002<\/span><\/div>\n
                   -X      regex        \u6392\u9664\u5339\u914d\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u65e5\u5fd7\u3002<\/span><\/div>\n
                   -x      tag            \u6392\u9664\u5339\u914dtag\u7684\u65e5\u5fd7\u3002<\/span><\/div>\n
                   \u5982\u679c-o\u9009\u9879\u88ab\u6307\u5b9a\uff0c\u9700\u8981\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u548ctag\u6765\u5236\u5b9a\u9700\u8981\u7684\u65e5\u5fd7\u3002<\/span><\/div>\n
TAGS<\/span><\/div>\n
\u4e0b\u9762\u7684\u65e5\u5fd7tag\u662f\u6b63\u786e\u5b9a\u4e49\u7684\uff1a<\/span><\/div>\n
    * Backend<\/span><\/div>\n
    * BackendClose<\/span><\/div>\n
    * BackendOpen<\/span><\/div>\n
    * BackendReuse<\/span><\/div>\n
    * BackendXID<\/span><\/div>\n
    * CLI<\/span><\/div>\n
    * ClientAddr<\/span><\/div>\n
    * Debug<\/span><\/div>\n
    * Error<\/span><\/div>\n
    * ExpBan<\/span><\/div>\n
    * ExpKill<\/span><\/div>\n
    * ExpPick<\/span><\/div>\n
    * Hit<\/span><\/div>\n
    * HitPass<\/span><\/div>\n
    * HttpError<\/span><\/div>\n
    * HttpGarbage<\/span><\/div>\n
    * Length<\/span><\/div>\n
    * ObjHeader<\/span><\/div>\n
    * ObjLostHeader<\/span><\/div>\n
    * ObjProtocol<\/span><\/div>\n
    * ObjRequest<\/span><\/div>\n
    * ObjResponse<\/span><\/div>\n
    * ObjStatus<\/span><\/div>\n
    * ObjURL<\/span><\/div>\n
    * ReqEnd<\/span><\/div>\n
    * ReqStart<\/span><\/div>\n
    * RxHeader<\/span><\/div>\n
    * RxLostHeader<\/span><\/div>\n
    * RxProtocol<\/span><\/div>\n
    * RxRequest<\/span><\/div>\n
    * RxResponse<\/span><\/div>\n
    * RxStatus<\/span><\/div>\n
    * RxURL<\/span><\/div>\n
    * SessionClose<\/span><\/div>\n
    * SessionOpen<\/span><\/div>\n
    * StatAddr<\/span><\/div>\n
    * StatSess<\/span><\/div>\n
    * TTL<\/span><\/div>\n
    * TxHeader<\/span><\/div>\n
    * TxLostHeader<\/span><\/div>\n
    * TxProtocol<\/span><\/div>\n
    * TxRequest<\/span><\/div>\n
    * TxResponse<\/span><\/div>\n
    * TxStatus<\/span><\/div>\n
    * TxURL<\/span><\/div>\n
    * VCL_acl<\/span><\/div>\n
    * VCL_call<\/span><\/div>\n
    * VCL_return<\/span><\/div>\n
    * VCL_trace<\/span><\/div>\n
    * WorkThread<\/span><\/div>\n
EXAMPLES<\/span><\/div>\n
 \u4e0b\u9762\u7684\u547d\u4ee4\u7b80\u5355\u7684\u6253\u5370\u65e5\u5fd7\u5230\u4e00\u4e2a\u6587\u4ef6\uff1a<\/span><\/div>\n
                   $ varnishlog -w \/var\/log\/varnish.log<\/span><\/div>\n
 \u4e0b\u9762\u8fd9\u6761\u547d\u4ee4\u8bfb\u53d6\u4e00\u4e2a\u65e5\u5fd7\u6587\u4ef6\uff0c\u7136\u662f\u8bf7\u6c42\u7684\u9996\u9875\uff1a<\/span><\/div>\n
                   $ varnishlog -r \/var\/log\/varnish.log -c -o RxURL ‘^\/$’<\/span><\/div>\n
SEE  ALSO<\/span><\/div>\n
    * varnishd(1)<\/span><\/div>\n
    * varnishhist(1)<\/span><\/div>\n
    * varnishncsa(1)<\/span><\/div>\n
    * varnishstat(1)<\/span><\/div>\n
    * varnishtop(1)<\/span><\/div>\n
HISTORY<\/span><\/div>\n
The varnishlog utility was developed by Poul-Henning Kamp ?phk@phk.freebsd.dk? in       cooperation with Verdens Gang AS, Linpro AS and Varnish Software. This manual page was         initially written by Dag-Erling Sm?rgrav.<\/span><\/div>\n
COPYRIGHT<\/span><\/div>\n
\u8fd9\u4e2a\u6587\u6863\u7684\u7248\u6743\u548cvarnish\u81ea\u8eab\u7684\u7248\u6743\u4e00\u6837\uff0c\u8bf7\u770bLICENCE\u3002<\/span><\/div>\n
    * Copyright (c) 2006 Verdens Gang AS<\/span><\/div>\n
    * Copyright (c) 2006-2008 Linpro AS<\/span><\/div>\n
    * Copyright (c) 2008-2010 Redpill Linpro AS<\/span><\/div>\n
    * Copyright (c) 2010 Varnish Software AS<\/span><\/div>\n
<\/div>\n
<\/div>\n
\u539f\u6587\uff1ahttp:\/\/linuxguest.blog.51cto.com\/195664\/369339<\/span><\/div>\n<\/div>\n

<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"

<\/p>\n

\n
Author:    Dag-Erling Sm?rgrav<\/span><\/div>\n
Author:    Per Buer<\/span><\/div>\n
Date:        2010-05-31<\/span><\/div>\n
Version:   0.2<\/span><\/div>\n
Manual section:       1<\/span><\/div>\n<\/div>\n

<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts\/1134"}],"collection":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/comments?post=1134"}],"version-history":[{"count":0,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts\/1134\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/media?parent=1134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/categories?post=1134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/tags?post=1134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}