How to collect lines from varnishncsa only from a specific domain?

Stefan Pommerening pom at dmsp.de
Wed Mar 30 11:59:03 CEST 2011


Am 30.03.2011 10:06, schrieb Geoff Simmons:
> On 03/29/11 10:09 PM, Kurt Kraut wrote:
>> I'm trying to use varnishncsa -c -I to collect the output of varnishncsa
>> concerning a specific domain (e.g.: domain.com). I've attempted the
>> following commands:
>>
>> varnishncsa -c -I *domain.com*
>> varnishncsa -c -I /*domain.com/
>>
>> And none of them worked. But the following command works:
>>
>> varnishncsa -c | grep domain.com
> The -I flag for varnishncsa and other tools does regex matching, not
> globbing with the '*' wildcard.
>
> But if it's enough for you to just match the string domain.com, you
> don't need anything else:
>
> varnishncsa -c -I domain.com
>
> Just like for grep.
>
>
> Best,
> Geoff

I have to support Kurt ;-)
Have the same problem (still moved it to the stack of 'unsolved stuff' 
so far...)

varnishncsa -I is either not or at least working strange...

Example:

aurora ~ # varnishncsa -c
XXX.XXX.XXX.XXX - - [30/Mar/2011:11:48:16 +0200] "GET 
http://www.annuna.net/ HTTP/1.0" 200 791 "-" "Mozilla/5.0 (Windows; U; 
Windows NT 6.1; de; rv:1.9.2.13) Gecko/20101211 Firefox/3.6.13"
XXX.XXX.XXX.XXX - - [30/Mar/2011:11:48:17 +0200] "GET 
http://www.annuna.net/StyleSheet.css HTTP/1.0" 200 2876 
"http://www.annuna.net/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; de; 
rv:1.9.2.13) Gecko/20101211 Firefox/3.6.13"
XXX.XXX.XXX.XXX - - [30/Mar/2011:11:48:17 +0200] "GET 
http://www.annuna.net/img/Logo_Annuna_850x680_weiss.jpg HTTP/1.0" 200 
31986 "http://www.annuna.net/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; 
de; rv:1.9.2.13) Gecko/20101211 Firefox/3.6.13"

aurora ~ # varnishncsa -c -I annuna
<nothing>

or

aurora ~ # varnishncsa -c -I "^.*annuna.*$"
<nothing>

 From my understanding it should at least match any line containing the 
character string "annuna"?
But it doesn't...

Am I doint it wrong? ^^

Wondering...
   Stefan

-- 

Dipl.-Inform. Stefan Pommerening
Informatik-Büro: IT-Dienste & Projekte, Consulting & Coaching
http://www.dmsp.de <http://www.dmsp.de/>






More information about the varnish-misc mailing list