Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
ad65eb54
Commit
ad65eb54
authored
Jul 03, 2012
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.varnish-cache.org/git/varnish-cache
parents
673c50de
0008c89e
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
146 additions
and
70 deletions
+146
-70
cache.h
bin/varnishd/cache/cache.h
+29
-4
cache_center.c
bin/varnishd/cache/cache_center.c
+14
-14
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+2
-2
cache_http.c
bin/varnishd/cache/cache_http.c
+6
-6
cache_pipe.c
bin/varnishd/cache/cache_pipe.c
+2
-2
cache_response.c
bin/varnishd/cache/cache_response.c
+1
-1
cache_session.c
bin/varnishd/cache/cache_session.c
+12
-13
flint.lnt
bin/varnishd/flint.lnt
+4
-0
mgt_main.c
bin/varnishd/mgt/mgt_main.c
+1
-1
cache_waiter.c
bin/varnishd/waiter/cache_waiter.c
+1
-1
cache_waiter_kqueue.c
bin/varnishd/waiter/cache_waiter_kqueue.c
+2
-2
cache_waiter_poll.c
bin/varnishd/waiter/cache_waiter_poll.c
+1
-1
varnishlog.c
bin/varnishlog/varnishlog.c
+5
-6
varnishncsa.c
bin/varnishncsa/varnishncsa.c
+3
-3
sess_close.h
include/tbl/sess_close.h
+43
-0
vsl_tags.h
include/tbl/vsl_tags.h
+20
-14
No files found.
bin/varnishd/cache/cache.h
View file @
ad65eb54
...
...
@@ -75,6 +75,30 @@ body_status(enum body_status e)
}
}
/*--------------------------------------------------------------------*/
enum
sess_close
{
SC_NULL
=
0
,
#define SESS_CLOSE(nm, desc) SC_##nm,
#include "tbl/sess_close.h"
#undef SESS_CLOSE
};
static
inline
const
char
*
sess_close_str
(
enum
sess_close
sc
,
int
want_desc
)
{
switch
(
sc
)
{
case
SC_NULL
:
return
(
want_desc
?
"(null)"
:
"NULL"
);
#define SESS_CLOSE(nm, desc) case SC_##nm: return(want_desc ? desc : #nm);
#include "tbl/sess_close.h"
#undef SESS_CLOSE
default:
return
(
want_desc
?
"(invalid)"
:
"INVALID"
);
}
}
/*--------------------------------------------------------------------*/
/*
* NB: HDR_STATUS is only used in cache_http.c, everybody else uses the
* http->status integer field.
...
...
@@ -585,7 +609,7 @@ struct req {
unsigned
char
digest
[
DIGEST_LEN
];
const
char
*
doclose
;
enum
sess_close
doclose
;
struct
exp
exp
;
unsigned
cur_method
;
unsigned
handling
;
...
...
@@ -655,6 +679,7 @@ struct sess {
enum
sess_step
sess_step
;
int
fd
;
enum
sess_close
reason
;
unsigned
vsl_id
;
uint32_t
vxid
;
...
...
@@ -840,7 +865,7 @@ const char *http_GetReq(const struct http *hp);
int
http_HdrIs
(
const
struct
http
*
hp
,
const
char
*
hdr
,
const
char
*
val
);
uint16_t
http_DissectRequest
(
struct
req
*
);
uint16_t
http_DissectResponse
(
struct
http
*
sp
,
const
struct
http_conn
*
htc
);
const
char
*
http_DoConnection
(
const
struct
http
*
hp
);
enum
sess_close
http_DoConnection
(
const
struct
http
*
);
void
http_CopyHome
(
const
struct
http
*
hp
);
void
http_Unset
(
struct
http
*
hp
,
const
char
*
hdr
);
void
http_CollectHdr
(
struct
http
*
hp
,
const
char
*
hdr
);
...
...
@@ -919,8 +944,8 @@ unsigned WRW_Write(const struct worker *w, const void *ptr, int len);
unsigned
WRW_WriteH
(
const
struct
worker
*
w
,
const
txt
*
hh
,
const
char
*
suf
);
/* cache_session.c [SES] */
void
SES_Close
(
struct
sess
*
sp
,
const
char
*
reason
);
void
SES_Delete
(
struct
sess
*
sp
,
const
char
*
reason
,
double
now
);
void
SES_Close
(
struct
sess
*
sp
,
enum
sess_close
reason
);
void
SES_Delete
(
struct
sess
*
sp
,
enum
sess_close
reason
,
double
now
);
void
SES_Charge
(
struct
worker
*
,
struct
req
*
);
struct
sesspool
*
SES_NewPool
(
struct
pool
*
pp
,
unsigned
pool_no
);
void
SES_DeletePool
(
struct
sesspool
*
sp
);
...
...
bin/varnishd/cache/cache_center.c
View file @
ad65eb54
...
...
@@ -109,7 +109,7 @@ cnt_wait(struct sess *sp, struct worker *wrk, struct req *req)
int
i
,
j
,
tmo
;
struct
pollfd
pfd
[
1
];
double
now
,
when
;
const
char
*
why
=
NULL
;
enum
sess_close
why
=
SC_
NULL
;
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
...
...
@@ -143,16 +143,16 @@ cnt_wait(struct sess *sp, struct worker *wrk, struct req *req)
req
->
t_req
=
now
;
return
(
0
);
}
else
if
(
i
==
-
1
)
{
why
=
"EOF"
;
why
=
SC_REM_CLOSE
;
break
;
}
else
if
(
i
==
-
2
)
{
why
=
"overflow"
;
why
=
SC_RX_OVERFLOW
;
break
;
}
else
if
(
i
==
-
3
)
{
/* Nothing but whitespace */
when
=
sp
->
t_idle
+
cache_param
->
timeout_idle
;
if
(
when
<
now
)
{
why
=
"timeout"
;
why
=
SC_RX_TIMEOUT
;
break
;
}
when
=
sp
->
t_idle
+
cache_param
->
timeout_linger
;
...
...
@@ -170,7 +170,7 @@ cnt_wait(struct sess *sp, struct worker *wrk, struct req *req)
when
=
sp
->
t_rx
+
cache_param
->
timeout_req
;
tmo
=
(
int
)(
1e3
*
(
when
-
now
));
if
(
when
<
now
||
tmo
==
0
)
{
why
=
"req timeout"
;
why
=
SC_RX_TIMEOUT
;
break
;
}
}
...
...
@@ -255,7 +255,7 @@ cnt_sess_done(struct sess *sp, struct worker *wrk, struct req *req)
req
->
hash_always_miss
=
0
;
req
->
hash_ignore_busy
=
0
;
if
(
sp
->
fd
>=
0
&&
req
->
doclose
!=
NULL
)
{
if
(
sp
->
fd
>=
0
&&
req
->
doclose
!=
SC_
NULL
)
{
/*
* This is an orderly close of the connection; ditch nolinger
* before we close, to get queued data transmitted.
...
...
@@ -268,7 +268,7 @@ cnt_sess_done(struct sess *sp, struct worker *wrk, struct req *req)
wrk
->
stats
.
sess_closed
++
;
AZ
(
req
->
vcl
);
SES_ReleaseReq
(
req
);
SES_Delete
(
sp
,
NULL
,
NAN
);
SES_Delete
(
sp
,
SC_
NULL
,
NAN
);
return
(
SESS_DONE_RET_GONE
);
}
...
...
@@ -318,9 +318,9 @@ CNT_Session(struct worker *wrk, struct req *req)
*/
if
(
sp
->
sess_step
==
S_STP_NEWREQ
&&
VTCP_blocking
(
sp
->
fd
))
{
if
(
errno
==
ECONNRESET
)
SES_Close
(
sp
,
"remote closed"
);
SES_Close
(
sp
,
SC_REM_CLOSE
);
else
SES_Close
(
sp
,
"error"
);
SES_Close
(
sp
,
SC_TX_ERROR
);
sdr
=
cnt_sess_done
(
sp
,
wrk
,
req
);
assert
(
sdr
==
SESS_DONE_RET_GONE
);
return
;
...
...
@@ -437,7 +437,7 @@ cnt_prepresp(struct worker *wrk, struct req *req)
req
->
res_mode
|=
RES_CHUNKED
;
}
else
{
req
->
res_mode
|=
RES_EOF
;
req
->
doclose
=
"EOF mode"
;
req
->
doclose
=
SC_TX_EOF
;
}
}
...
...
@@ -573,7 +573,7 @@ cnt_error(struct worker *wrk, struct req *req)
(
uint16_t
)
cache_param
->
http_max_hdr
);
bo
->
stats
=
NULL
;
if
(
req
->
obj
==
NULL
)
{
req
->
doclose
=
"Out of objects"
;
req
->
doclose
=
SC_OVERLOAD
;
req
->
director
=
NULL
;
http_Teardown
(
bo
->
beresp
);
http_Teardown
(
bo
->
bereq
);
...
...
@@ -611,7 +611,7 @@ cnt_error(struct worker *wrk, struct req *req)
/* We always close when we take this path */
req
->
doclose
=
"error"
;
req
->
doclose
=
SC_TX_ERROR
;
req
->
wantbody
=
1
;
assert
(
req
->
handling
==
VCL_RET_DELIVER
);
...
...
@@ -1504,7 +1504,7 @@ cnt_start(struct worker *wrk, struct req *req)
/* If we could not even parse the request, just close */
if
(
req
->
err_code
==
400
)
{
SES_Close
(
req
->
sp
,
"junk"
);
SES_Close
(
req
->
sp
,
SC_RX_JUNK
);
return
(
1
);
}
...
...
@@ -1520,7 +1520,7 @@ cnt_start(struct worker *wrk, struct req *req)
if
(
strcasecmp
(
p
,
"100-continue"
))
{
req
->
err_code
=
417
;
}
else
if
(
strlen
(
r
)
!=
write
(
req
->
sp
->
fd
,
r
,
strlen
(
r
)))
{
SES_Close
(
req
->
sp
,
"remote closed"
);
SES_Close
(
req
->
sp
,
SC_REM_CLOSE
);
return
(
1
);
}
}
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
ad65eb54
...
...
@@ -325,7 +325,7 @@ ESI_Deliver(struct req *req)
st
->
ptr
+
off
,
l2
);
if
(
WRW_Error
(
req
->
wrk
))
{
SES_Close
(
req
->
sp
,
"remote closed"
);
SC_REM_CLOSE
);
p
=
e
;
break
;
}
...
...
@@ -376,7 +376,7 @@ ESI_Deliver(struct req *req)
if
(
vgz
!=
NULL
)
VGZ_WrwFlush
(
req
->
wrk
,
vgz
);
if
(
WRW_Flush
(
req
->
wrk
))
{
SES_Close
(
req
->
sp
,
"remote closed"
);
SES_Close
(
req
->
sp
,
SC_REM_CLOSE
);
p
=
e
;
break
;
}
...
...
bin/varnishd/cache/cache_http.c
View file @
ad65eb54
...
...
@@ -410,19 +410,19 @@ http_GetHdrField(const struct http *hp, const char *hdr,
* XXX: redo with http_GetHdrField() ?
*/
const
char
*
enum
sess_close
http_DoConnection
(
const
struct
http
*
hp
)
{
char
*
p
,
*
q
;
const
char
*
ret
;
enum
sess_close
ret
;
unsigned
u
;
if
(
!
http_GetHdr
(
hp
,
H_Connection
,
&
p
))
{
if
(
hp
->
protover
<
11
)
return
(
"not HTTP/1.1"
);
return
(
NULL
);
return
(
SC_REQ_HTTP10
);
return
(
SC_
NULL
);
}
ret
=
NULL
;
ret
=
SC_
NULL
;
AN
(
p
);
for
(;
*
p
;
p
++
)
{
if
(
vct_issp
(
*
p
))
...
...
@@ -434,7 +434,7 @@ http_DoConnection(const struct http *hp)
break
;
u
=
pdiff
(
p
,
q
);
if
(
u
==
5
&&
!
strncasecmp
(
p
,
"close"
,
u
))
ret
=
"Connection: close"
;
ret
=
SC_REQ_CLOSE
;
u
=
http_findhdr
(
hp
,
u
,
p
);
if
(
u
!=
0
)
hp
->
hdf
[
u
]
|=
HDF_FILTER
;
...
...
bin/varnishd/cache/cache_pipe.c
View file @
ad65eb54
...
...
@@ -92,7 +92,7 @@ PipeRequest(struct req *req)
i
=
WRW_FlushRelease
(
wrk
);
if
(
i
)
{
SES_Close
(
req
->
sp
,
"pipe"
);
SES_Close
(
req
->
sp
,
SC_TX_PIPE
);
VDI_CloseFd
(
&
vc
);
return
;
}
...
...
@@ -132,7 +132,7 @@ PipeRequest(struct req *req)
fds
[
1
].
fd
=
-
1
;
}
}
SES_Close
(
req
->
sp
,
"pipe"
);
SES_Close
(
req
->
sp
,
SC_TX_PIPE
);
VDI_CloseFd
(
&
vc
);
bo
->
vbc
=
NULL
;
}
bin/varnishd/cache/cache_response.c
View file @
ad65eb54
...
...
@@ -285,5 +285,5 @@ RES_WriteObj(struct req *req)
WRW_EndChunk
(
req
->
wrk
);
if
(
WRW_FlushRelease
(
req
->
wrk
)
&&
req
->
sp
->
fd
>=
0
)
SES_Close
(
req
->
sp
,
"remote closed"
);
SES_Close
(
req
->
sp
,
SC_REM_CLOSE
);
}
bin/varnishd/cache/cache_session.c
View file @
ad65eb54
...
...
@@ -175,7 +175,7 @@ ses_vsl_socket(struct sess *sp, const char *lsockname)
strcpy
(
laddr
,
"-"
);
strcpy
(
lport
,
"-"
);
}
VSL
(
SLT_Sess
ion
Open
,
sp
->
vxid
,
"%s %s %s %s %s"
,
VSL
(
SLT_SessOpen
,
sp
->
vxid
,
"%s %s %s %s %s"
,
sp
->
addr
,
sp
->
port
,
lsockname
,
laddr
,
lport
);
}
...
...
@@ -203,6 +203,7 @@ SES_pool_accept_task(struct worker *wrk, void *arg)
VCA_FailSess
(
wrk
);
return
;
}
wrk
->
acct_tmp
.
sess
++
;
sp
->
t_open
=
VTIM_real
();
sp
->
t_rx
=
sp
->
t_open
;
...
...
@@ -217,9 +218,6 @@ SES_pool_accept_task(struct worker *wrk, void *arg)
req
->
vxid
=
VXID_Get
(
&
wrk
->
vxid_pool
);
wrk
->
acct_tmp
.
sess
++
;
sp
->
sess_step
=
S_STP_NEWREQ
;
ses_pool_task
(
wrk
,
req
);
}
...
...
@@ -249,7 +247,7 @@ SES_ScheduleReq(struct req *req)
sp
->
t_idle
=
VTIM_real
();
AN
(
req
->
vcl
);
VCL_Rel
(
&
req
->
vcl
);
SES_Delete
(
sp
,
"dropped"
,
sp
->
t_idle
);
SES_Delete
(
sp
,
SC_OVERLOAD
,
sp
->
t_idle
);
return
(
1
);
}
return
(
0
);
...
...
@@ -282,7 +280,7 @@ SES_Handle(struct sess *sp, double now)
if
(
Pool_Task
(
pp
->
pool
,
&
sp
->
task
,
POOL_QUEUE_FRONT
))
{
VSC_C_main
->
client_drop_late
++
;
sp
->
t_idle
=
VTIM_real
();
SES_Delete
(
sp
,
"dropped"
,
sp
->
t_idle
);
SES_Delete
(
sp
,
SC_OVERLOAD
,
sp
->
t_idle
);
}
}
...
...
@@ -293,12 +291,12 @@ SES_Handle(struct sess *sp, double now)
*/
void
SES_Close
(
struct
sess
*
sp
,
const
char
*
reason
)
SES_Close
(
struct
sess
*
sp
,
enum
sess_close
reason
)
{
int
i
;
assert
(
sp
->
fd
>=
0
);
VSL
(
SLT_SessionClose
,
sp
->
vsl_id
,
"%s"
,
reason
)
;
sp
->
reason
=
reason
;
i
=
close
(
sp
->
fd
);
assert
(
i
==
0
||
errno
!=
EBADF
);
/* XXX EINVAL seen */
sp
->
fd
=
-
1
;
...
...
@@ -314,7 +312,7 @@ SES_Close(struct sess *sp, const char *reason)
*/
void
SES_Delete
(
struct
sess
*
sp
,
const
char
*
reason
,
double
now
)
SES_Delete
(
struct
sess
*
sp
,
enum
sess_close
reason
,
double
now
)
{
struct
acct
*
b
;
struct
sesspool
*
pp
;
...
...
@@ -324,7 +322,7 @@ SES_Delete(struct sess *sp, const char *reason, double now)
CHECK_OBJ_NOTNULL
(
pp
,
SESSPOOL_MAGIC
);
AN
(
pp
->
pool
);
if
(
reason
!=
NULL
)
if
(
reason
!=
SC_
NULL
)
SES_Close
(
sp
,
reason
);
if
(
isnan
(
now
))
now
=
VTIM_real
();
...
...
@@ -338,10 +336,11 @@ SES_Delete(struct sess *sp, const char *reason, double now)
b
=
&
sp
->
acct_ses
;
VSL
(
SLT_StatSess
,
sp
->
vsl_id
,
"%s %s %.0f %ju %ju %ju %ju %ju %ju %ju"
,
sp
->
addr
,
sp
->
port
,
VSL
(
SLT_SessClose
,
sp
->
vxid
,
"%s %.3f %ju %ju %ju %ju %ju %ju"
,
sess_close_str
(
sp
->
reason
,
0
),
now
-
sp
->
t_open
,
b
->
sess
,
b
->
req
,
b
->
pipe
,
b
->
pass
,
b
->
req
,
b
->
pipe
,
b
->
pass
,
b
->
fetch
,
b
->
hdrbytes
,
b
->
bodybytes
);
MPL_Free
(
pp
->
mpl_sess
,
sp
);
...
...
bin/varnishd/flint.lnt
View file @
ad65eb54
...
...
@@ -108,6 +108,10 @@
-esym(458, heritage)
-esym(458, name_key)
//////////////
// 436 = Apparent preprocessor directive in invocation of macro '___'
-emacro(436, SLTM)
//////////////
+libh mgt_event.h
...
...
bin/varnishd/mgt/mgt_main.c
View file @
ad65eb54
...
...
@@ -86,7 +86,7 @@ mgt_sltm(const char *tag, const char *sdesc, const char *ldesc)
printf
(
"%s
\n
"
,
sdesc
);
else
printf
(
"%s
\n
"
,
"(description not yet written)"
);
}
static
void
...
...
bin/varnishd/waiter/cache_waiter.c
View file @
ad65eb54
...
...
@@ -74,6 +74,6 @@ WAIT_Enter(struct sess *sp)
* acceptor thread, to reduce syscall density of the latter.
*/
if
(
VTCP_nonblocking
(
sp
->
fd
))
SES_Close
(
sp
,
"remote closed"
);
SES_Close
(
sp
,
SC_REM_CLOSE
);
waiter
->
pass
(
waiter_priv
,
sp
);
}
bin/varnishd/waiter/cache_waiter_kqueue.c
View file @
ad65eb54
...
...
@@ -133,7 +133,7 @@ vwk_sess_ev(struct vwk *vwk, const struct kevent *kp, double now)
return
;
}
else
if
(
kp
->
flags
&
EV_EOF
)
{
VTAILQ_REMOVE
(
&
vwk
->
sesshead
,
sp
,
list
);
SES_Delete
(
sp
,
"EOF"
,
now
);
SES_Delete
(
sp
,
SC_REM_CLOSE
,
now
);
return
;
}
else
{
VSL
(
SLT_Debug
,
sp
->
vsl_id
,
...
...
@@ -204,7 +204,7 @@ vwk_thread(void *priv)
break
;
VTAILQ_REMOVE
(
&
vwk
->
sesshead
,
sp
,
list
);
// XXX: not yet (void)VTCP_linger(sp->fd, 0);
SES_Delete
(
sp
,
"timeout"
,
now
);
SES_Delete
(
sp
,
SC_RX_TIMEOUT
,
now
);
}
}
}
...
...
bin/varnishd/waiter/cache_waiter_poll.c
View file @
ad65eb54
...
...
@@ -162,7 +162,7 @@ vwp_main(void *priv)
VTAILQ_REMOVE
(
&
vwp
->
sesshead
,
sp
,
list
);
vwp_unpoll
(
vwp
,
fd
);
// XXX: not yet (void)VTCP_linger(sp->fd, 0);
SES_Delete
(
sp
,
"timeout"
,
now
);
SES_Delete
(
sp
,
SC_RX_TIMEOUT
,
now
);
}
}
if
(
v2
&&
vwp
->
pollfd
[
vwp
->
pipes
[
0
]].
revents
)
{
...
...
bin/varnishlog/varnishlog.c
View file @
ad65eb54
...
...
@@ -115,9 +115,9 @@ h_order(void *priv, enum VSL_tag_e tag, unsigned fd, unsigned len,
ob
[
fd
]
=
VSB_new_auto
();
assert
(
ob
[
fd
]
!=
NULL
);
}
if
((
tag
==
SLT_BackendOpen
||
tag
==
SLT_Sess
ion
Open
||
if
((
tag
==
SLT_BackendOpen
||
tag
==
SLT_SessOpen
||
(
tag
==
SLT_ReqStart
&&
last
[
fd
]
!=
SLT_Sess
ion
Open
&&
last
[
fd
]
!=
SLT_SessOpen
&&
last
[
fd
]
!=
SLT_VCL_acl
)
||
(
tag
==
SLT_BackendXID
&&
last
[
fd
]
!=
SLT_BackendOpen
))
&&
...
...
@@ -127,7 +127,7 @@ h_order(void *priv, enum VSL_tag_e tag, unsigned fd, unsigned len,
* the end of the previous one. Spit it out anyway before
* starting on the new one.
*/
if
(
last
[
fd
]
!=
SLT_Sess
ion
Close
)
if
(
last
[
fd
]
!=
SLT_SessClose
)
VSB_printf
(
ob
[
fd
],
"%5d %-12s %c %s
\n
"
,
fd
,
"Interrupted"
,
type
,
VSL_tags
[
tag
]);
h_order_finish
(
fd
,
vd
);
...
...
@@ -165,7 +165,6 @@ h_order(void *priv, enum VSL_tag_e tag, unsigned fd, unsigned len,
case
SLT_ReqEnd
:
case
SLT_BackendClose
:
case
SLT_BackendReuse
:
case
SLT_StatSess
:
h_order_finish
(
fd
,
vd
);
break
;
default:
...
...
@@ -180,8 +179,8 @@ do_order(struct VSM_data *vd)
int
i
;
if
(
!
b_flag
)
{
VSL_Select
(
vd
,
SLT_Sess
ion
Open
);
VSL_Select
(
vd
,
SLT_Sess
ion
Close
);
VSL_Select
(
vd
,
SLT_SessOpen
);
VSL_Select
(
vd
,
SLT_SessClose
);
VSL_Select
(
vd
,
SLT_ReqEnd
);
}
if
(
!
c_flag
)
{
...
...
bin/varnishncsa/varnishncsa.c
View file @
ad65eb54
...
...
@@ -535,11 +535,11 @@ collect_client(struct logline *lp, enum VSL_tag_e tag, unsigned spec,
lp
->
df_b
=
trimline
(
ptr
,
end
);
break
;
case
SLT_Sess
ion
Close
:
case
SLT_SessClose
:
if
(
!
lp
->
active
)
break
;
if
(
strncmp
(
ptr
,
"
pipe
"
,
len
)
==
0
||
strncmp
(
ptr
,
"
error
"
,
len
)
==
0
)
{
if
(
strncmp
(
ptr
,
"
TX_PIPE
"
,
len
)
==
0
||
strncmp
(
ptr
,
"
TX_ERROR
"
,
len
)
==
0
)
{
clean_logline
(
lp
);
break
;
}
...
...
include/tbl/sess_close.h
0 → 100644
View file @
ad65eb54
/*-
* Copyright (c) 2012 Varnish Software AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
/*lint -save -e525 -e539 */
SESS_CLOSE
(
REM_CLOSE
,
"Client Closed"
)
SESS_CLOSE
(
REQ_CLOSE
,
"Client requested close"
)
SESS_CLOSE
(
REQ_HTTP10
,
"proto < HTTP.1.1"
)
SESS_CLOSE
(
RX_JUNK
,
"Received junk data"
)
SESS_CLOSE
(
RX_OVERFLOW
,
"Received buffer overflow"
)
SESS_CLOSE
(
RX_TIMEOUT
,
"Receive timeout"
)
SESS_CLOSE
(
TX_PIPE
,
"Piped transaction"
)
SESS_CLOSE
(
TX_ERROR
,
"Error transaction"
)
SESS_CLOSE
(
TX_EOF
,
"EOF transmission"
)
SESS_CLOSE
(
OVERLOAD
,
"Out of some resource"
)
/*lint -restore */
include/tbl/vsl_tags.h
View file @
ad65eb54
...
...
@@ -52,7 +52,6 @@ SLTM(Error, "Error messages",
SLTM
(
CLI
,
"CLI communication"
,
"CLI communication between master and child process."
)
SLTM
(
StatSess
,
"Session statistics"
,
""
)
SLTM
(
ReqEnd
,
"Client request end"
,
"Marks the end of client request.
\n\n
"
...
...
@@ -64,7 +63,9 @@ SLTM(ReqEnd, "Client request end",
"dTtx
\n
Time to transmit response
\n\n
"
)
SLTM
(
SessionOpen
,
"Client connection opened"
,
/*---------------------------------------------------------------------*/
SLTM
(
SessOpen
,
"Client connection opened"
,
"The first record for a client connection, with the
\n
"
"socket-endpoints of the connection.
\n\n
"
"caddr
\n
Client IPv4/6 address
\n\n
"
...
...
@@ -74,19 +75,24 @@ SLTM(SessionOpen, "Client connection opened",
"lport
\n
Local TCP port ('-' if !$log_local_addr)
\n\n
"
)
SLTM
(
SessionClose
,
"Client connection closed"
,
"SessionClose tells you why HTTP client-connections are closed. "
"These can be: "
"'timeout' - No keep-alive was received within sess_timeout. "
"'Connection: close' - The client specifed that keepalive should "
"be disabled by sending a 'Connection: close' header. "
"'no request' - No initial request was received within sess_timeout. "
"'EOF' - ? "
"'remote closed' - ? "
"'error' - Processing reached vcl_error even if the status code "
"indicates success. "
"' blast' - ?"
#define SESS_CLOSE(nm, desc) " " #nm "\n\t" desc "\n\n"
SLTM
(
SessClose
,
"Client connection closed"
,
"SessionClose is the last record for any client connection.
\n\n
"
"reason
\n
Why the connection closed.
\n\n
"
#include <tbl/sess_close.h>
"duration
\n
How long the session were open.
\n\n
"
"Nreq
\n
How many requests on session.
\n\n
"
"Npipe
\n
If 'pipe' were used on session.
\n\n
"
"Npass
\n
Requests handled with pass.
\n\n
"
"Nfetch
\n
Backend fetches by session.
\n\n
"
"Bhdr
\n
Header bytes sent on session.
\n\n
"
"Bbody
\n
Body bytes sent on session.
\n\n
"
)
#undef SESS_CLOSE
/*---------------------------------------------------------------------*/
SLTM
(
BackendOpen
,
"Backend connection opened"
,
""
)
SLTM
(
BackendXID
,
"The unique ID of the backend transaction"
,
""
)
SLTM
(
BackendReuse
,
"Backend connection reused"
,
""
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment