Varnish logging

Dirk Gomez dirk at dirkgomez.de
Fri Apr 27 14:22:50 CEST 2007


> Dirk, if you are comfortable building Varnish from sources, try
> grabbing the following file:
>
> http://varnish.projects.linpro.no/svn/trunk/varnish-cache/bin/ 
> varnishncsa/varnishncsa.c
>
> Stick it in the obvious place in your source tree, rebuild and
> reinstall.  It will work fine in a 1.0 tree.

DES, here's what I did:

* Checked out the 1.0.3 tag.
* Checkout above file from trunk.
* Stuck it into the obvious place
* Compiled, created and installed a Debian varnish-103 package.

varnishncsa doesn't write to a log file anymore though.

execve("/usr/bin/varnishncsa", ["/usr/bin/varnishncsa", "-w", "foo"],  
[/* 19 vars */]) = 0
uname({sys="Linux", node="test01.dirkgomez.de", ...}) = 0
brk(0)                                  = 0x804b000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or  
directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,  
-1, 0) = 0x40017000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or  
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=19929, ...}) = 0
mmap2(NULL, 19929, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40019000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or  
directory)
open("/usr/lib/libvarnish.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\21\0"...,  
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=16468, ...}) = 0
mmap2(NULL, 19480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,  
0) = 0x4001e000
mmap2(0x40022000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| 
MAP_DENYWRITE, 3, 0x3) = 0x40022000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or  
directory)
open("/usr/lib/libvarnishapi.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\f\0"...,  
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=11352, ...}) = 0
mmap2(NULL, 14600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,  
0) = 0x40023000
mmap2(0x40026000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| 
MAP_DENYWRITE, 3, 0x2) = 0x40026000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or  
directory)
open("/lib/tls/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360G\0"...,  
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=85010, ...}) = 0
mmap2(NULL, 70104, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,  
0) = 0x40166000
mmap2(0x40174000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| 
MAP_DENYWRITE, 3, 0xd) = 0x40174000
mmap2(0x40176000, 4568, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| 
MAP_ANONYMOUS, -1, 0) = 0x40176000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,  
-1, 0) = 0x40178000
mprotect(0x4015b000, 20480, PROT_READ)  = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0x401786c0, limit: 
1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,  
seg_not_present:0, useable:1}) = 0
munmap(0x40019000, 19929)               = 0
set_tid_address(0x40178708)             = 8910
rt_sigaction(SIGRTMIN, {0x4016a450, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x4016a3c0, [], SA_RESTART|SA_SIGINFO}, NULL,  
8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY})  
= 0
uname({sys="Linux", node="test01.dirkgomez.de", ...}) = 0
brk(0)                                  = 0x804b000
brk(0x807c000)                          = 0x807c000
open("/tmp/_.vsl", O_RDONLY)            = 3
read(3, "2\332y\371\214\1\0\0=\3501F\344\1\0\0\0\0\200\0+\362\1"...,  
396) = 396
mmap2(NULL, 8389004, PROT_READ, MAP_SHARED, 3, 0) = 0x40179000
open("foo", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
rt_sigaction(SIGHUP, {0x8048b90, [HUP], SA_RESTART}, {SIG_DFL}, 8) = 0
nanosleep({0, 50000000}, NULL)          = 0
nanosleep({0, 50000000}, NULL)          = 0
nanosleep({0, 50000000}, NULL)          = 0
...

and then it continues to nanosleep.

varnishlog though does show activity on the server.

-- Dirk




More information about the varnish-misc mailing list