varnishlog:多个TxStatus代码

时间:2014-06-19 15:23:01

标签: varnish

如果有办法用varnishlog记录多个TxStatus代码? Varnishlog男子说没有:) 我怎么能记录多个代码?

我的命令现在看起来像varnishlog -c -m TxStatus:301 提前谢谢!

1 个答案:

答案 0 :(得分:0)

您可以尝试以下语法:

{ varnishlog -c -m TxStatus:301 & varnishlog -c -m TxStatus:404 & } > varnish-status.log

查看实时日志:

tail -f varnish-status.log

停止记录:

$ ps ax | grep varnishlog
 5009 pts/0    S      0:00 varnishlog -c -m TxStatus:301
 5010 pts/0    S      0:00 varnishlog -c -m TxStatus:404
 5636 pts/0    S+     0:00 grep varnishlog
$ kill 5009
$ kill 5010