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
f46e5c73
Commit
f46e5c73
authored
Jan 27, 2015
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a display format field to the VSC_F table
The field describes how to best display the field.
parent
52b0e597
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
166 additions
and
163 deletions
+166
-163
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_pool.c
bin/varnishd/cache/cache_pool.c
+2
-2
vsc_f_main.h
include/tbl/vsc_f_main.h
+111
-111
vsc_fields.h
include/tbl/vsc_fields.h
+46
-43
vsc.h
include/vapi/vsc.h
+1
-1
vsc_int.h
include/vapi/vsc_int.h
+1
-1
vsc.c
lib/libvarnishapi/vsc.c
+3
-3
vsc2rst.c
man/vsc2rst.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
f46e5c73
...
...
@@ -268,7 +268,7 @@ struct acct_bereq {
#define L0(t, n)
#define L1(t, n) t n;
#define VSC_F(n,t,l,s,v,d,e) L##l(t, n)
#define VSC_F(n,t,l,s,
f,
v,d,e) L##l(t, n)
struct
dstat
{
unsigned
summs
;
#include "tbl/vsc_f_main.h"
...
...
bin/varnishd/cache/cache_pool.c
View file @
f46e5c73
...
...
@@ -93,7 +93,7 @@ pool_sumstat(const struct dstat *src)
Lck_AssertHeld
(
&
wstat_mtx
);
#define L0(n)
#define L1(n) (VSC_C_main->n += src->n)
#define VSC_F(n,t,l,s,v,d,e) L##l(n);
#define VSC_F(n,t,l,s,
f,
v,d,e) L##l(n);
#include "tbl/vsc_f_main.h"
#undef VSC_F
#undef L0
...
...
@@ -132,7 +132,7 @@ pool_addstat(struct dstat *dst, struct dstat *src)
dst
->
summs
++
;
#define L0(n)
#define L1(n) (dst->n += src->n)
#define VSC_F(n,t,l,s,v,d,e) L##l(n);
#define VSC_F(n,t,l,s,
f,
v,d,e) L##l(n);
#include "tbl/vsc_f_main.h"
#undef VSC_F
#undef L0
...
...
include/tbl/vsc_f_main.h
View file @
f46e5c73
This diff is collapsed.
Click to expand it.
include/tbl/vsc_fields.h
View file @
f46e5c73
...
...
@@ -29,7 +29,7 @@
* Definition of all shared memory statistics below (except main - see
* include/tbl/vsc_f_main.h).
*
* Fields (n, t, l, s, v, d, e):
* Fields (n, t, l, s,
f,
v, d, e):
* n - Name: Field name, in C-source and stats programs
* t - C-type: uint64_t, unless marked in 's'
* l - Local: Local counter in worker thread.
...
...
@@ -37,6 +37,9 @@
* 'b' - Bitmap
* 'c' - Counter, never decreases.
* 'g' - Gauge, goes up and down
* f - Format: Display format for the field
* 'b' - Bitmap
* 'i' - Integer
* v - Verbosity: Counter verbosity level (see vsc_levels.h)
* d - Description: Short description of field (for screen use)
* e - Explanation: Long explanation of field (for doc use)
...
...
@@ -61,32 +64,32 @@
#ifdef VSC_DO_MGT
VSC_F
(
uptime
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
uptime
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Management process uptime"
,
"Uptime in seconds of the management process"
)
VSC_F
(
child_start
,
uint64_t
,
0
,
'c'
,
diag
,
VSC_F
(
child_start
,
uint64_t
,
0
,
'c'
,
'i'
,
diag
,
"Child process started"
,
"Number of times the child process has been started"
)
VSC_F
(
child_exit
,
uint64_t
,
0
,
'c'
,
diag
,
VSC_F
(
child_exit
,
uint64_t
,
0
,
'c'
,
'i'
,
diag
,
"Child process normal exit"
,
"Number of times the child process has been cleanly stopped"
)
VSC_F
(
child_stop
,
uint64_t
,
0
,
'c'
,
diag
,
VSC_F
(
child_stop
,
uint64_t
,
0
,
'c'
,
'i'
,
diag
,
"Child process unexpected exit"
,
"Number of times the child process has exited with an unexpected"
" return code"
)
VSC_F
(
child_died
,
uint64_t
,
0
,
'c'
,
diag
,
VSC_F
(
child_died
,
uint64_t
,
0
,
'c'
,
'i'
,
diag
,
"Child process died (signal)"
,
"Number of times the child process has died due to signals"
)
VSC_F
(
child_dump
,
uint64_t
,
0
,
'c'
,
diag
,
VSC_F
(
child_dump
,
uint64_t
,
0
,
'c'
,
'i'
,
diag
,
"Child process core dumped"
,
"Number of times the child process has produced core dumps"
)
VSC_F
(
child_panic
,
uint64_t
,
0
,
'c'
,
diag
,
VSC_F
(
child_panic
,
uint64_t
,
0
,
'c'
,
'i'
,
diag
,
"Child process panic"
,
"Number of times the management process has caught a child panic"
)
...
...
@@ -97,15 +100,15 @@ VSC_F(child_panic, uint64_t, 0, 'c', diag,
#ifdef VSC_DO_LCK
VSC_F
(
creat
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
creat
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Created locks"
,
""
)
VSC_F
(
destroy
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
destroy
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Destroyed locks"
,
""
)
VSC_F
(
locks
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
locks
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Lock Operations"
,
""
)
...
...
@@ -117,31 +120,31 @@ VSC_F(locks, uint64_t, 0, 'c', debug,
*/
#if defined(VSC_DO_SMA) || defined (VSC_DO_SMF)
VSC_F
(
c_req
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
c_req
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Allocator requests"
,
""
)
VSC_F
(
c_fail
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
c_fail
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Allocator failures"
,
""
)
VSC_F
(
c_bytes
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
c_bytes
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Bytes allocated"
,
""
)
VSC_F
(
c_freed
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
c_freed
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Bytes freed"
,
""
)
VSC_F
(
g_alloc
,
uint64_t
,
0
,
'g'
,
info
,
VSC_F
(
g_alloc
,
uint64_t
,
0
,
'g'
,
'i'
,
info
,
"Allocations outstanding"
,
""
)
VSC_F
(
g_bytes
,
uint64_t
,
0
,
'g'
,
info
,
VSC_F
(
g_bytes
,
uint64_t
,
0
,
'g'
,
'i'
,
info
,
"Bytes outstanding"
,
""
)
VSC_F
(
g_space
,
uint64_t
,
0
,
'g'
,
info
,
VSC_F
(
g_space
,
uint64_t
,
0
,
'g'
,
'i'
,
info
,
"Bytes available"
,
""
)
...
...
@@ -157,15 +160,15 @@ VSC_F(g_space, uint64_t, 0, 'g', info,
/**********************************************************************/
#ifdef VSC_DO_SMF
VSC_F
(
g_smf
,
uint64_t
,
0
,
'g'
,
info
,
VSC_F
(
g_smf
,
uint64_t
,
0
,
'g'
,
'i'
,
info
,
"N struct smf"
,
""
)
VSC_F
(
g_smf_frag
,
uint64_t
,
0
,
'g'
,
info
,
VSC_F
(
g_smf_frag
,
uint64_t
,
0
,
'g'
,
'i'
,
info
,
"N small free smf"
,
""
)
VSC_F
(
g_smf_large
,
uint64_t
,
0
,
'g'
,
info
,
VSC_F
(
g_smf_large
,
uint64_t
,
0
,
'g'
,
'i'
,
info
,
"N large free smf"
,
""
)
...
...
@@ -175,49 +178,49 @@ VSC_F(g_smf_large, uint64_t, 0, 'g', info,
#ifdef VSC_DO_VBE
VSC_F
(
vcls
,
uint64_t
,
0
,
'g'
,
debug
,
VSC_F
(
vcls
,
uint64_t
,
0
,
'g'
,
'i'
,
debug
,
"VCL references"
,
""
)
VSC_F
(
happy
,
uint64_t
,
0
,
'b'
,
info
,
VSC_F
(
happy
,
uint64_t
,
0
,
'b'
,
'b'
,
info
,
"Happy health probes"
,
""
)
VSC_F
(
bereq_hdrbytes
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
bereq_hdrbytes
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Request header bytes"
,
"Total backend request header bytes sent"
)
VSC_F
(
bereq_bodybytes
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
bereq_bodybytes
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Request body bytes"
,
"Total backend request body bytes sent"
)
VSC_F
(
beresp_hdrbytes
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
beresp_hdrbytes
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Response header bytes"
,
"Total backend response header bytes received"
)
VSC_F
(
beresp_bodybytes
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
beresp_bodybytes
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Response body bytes"
,
"Total backend response body bytes received"
)
VSC_F
(
pipe_hdrbytes
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
pipe_hdrbytes
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Pipe request header bytes"
,
"Total request bytes sent for piped sessions"
)
VSC_F
(
pipe_out
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
pipe_out
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Piped bytes to backend"
,
"Total number of bytes forwarded to backend in"
" pipe sessions"
)
VSC_F
(
pipe_in
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
pipe_in
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Piped bytes from backend"
,
"Total number of bytes forwarded from backend in"
" pipe sessions"
)
VSC_F
(
conn
,
uint64_t
,
0
,
'g'
,
info
,
VSC_F
(
conn
,
uint64_t
,
0
,
'g'
,
'i'
,
info
,
"Concurrent connections to backend"
,
""
)
VSC_F
(
req
,
uint64_t
,
0
,
'c'
,
info
,
VSC_F
(
req
,
uint64_t
,
0
,
'c'
,
'i'
,
info
,
"Backend requests sent"
,
""
)
...
...
@@ -227,47 +230,47 @@ VSC_F(req, uint64_t, 0, 'c', info,
/**********************************************************************/
#ifdef VSC_DO_MEMPOOL
VSC_F
(
live
,
uint64_t
,
0
,
'g'
,
debug
,
VSC_F
(
live
,
uint64_t
,
0
,
'g'
,
'i'
,
debug
,
"In use"
,
""
)
VSC_F
(
pool
,
uint64_t
,
0
,
'g'
,
debug
,
VSC_F
(
pool
,
uint64_t
,
0
,
'g'
,
'i'
,
debug
,
"In Pool"
,
""
)
VSC_F
(
sz_wanted
,
uint64_t
,
0
,
'g'
,
debug
,
VSC_F
(
sz_wanted
,
uint64_t
,
0
,
'g'
,
'i'
,
debug
,
"Size requested"
,
""
)
VSC_F
(
sz_needed
,
uint64_t
,
0
,
'g'
,
debug
,
VSC_F
(
sz_needed
,
uint64_t
,
0
,
'g'
,
'i'
,
debug
,
"Size allocated"
,
""
)
VSC_F
(
allocs
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
allocs
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Allocations"
,
""
)
VSC_F
(
frees
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
frees
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Frees"
,
""
)
VSC_F
(
recycle
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
recycle
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Recycled from pool"
,
""
)
VSC_F
(
timeout
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
timeout
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Timed out from pool"
,
""
)
VSC_F
(
toosmall
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
toosmall
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Too small to recycle"
,
""
)
VSC_F
(
surplus
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
surplus
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Too many for pool"
,
""
)
VSC_F
(
randry
,
uint64_t
,
0
,
'c'
,
debug
,
VSC_F
(
randry
,
uint64_t
,
0
,
'c'
,
'i'
,
debug
,
"Pool ran dry"
,
""
)
...
...
include/vapi/vsc.h
View file @
f46e5c73
...
...
@@ -190,7 +190,7 @@ const struct VSC_level_desc *VSC_LevelDesc(unsigned level);
#undef VSC_TYPE_F
#define VSC_DO(U,l,t) extern const struct VSC_desc VSC_desc_##l[];
#define VSC_F(n,t,l,s,v,d,e)
#define VSC_F(n,t,l,s,
f,
v,d,e)
#define VSC_DONE(U,l,t)
#include "tbl/vsc_all.h"
#undef VSC_DO
...
...
include/vapi/vsc_int.h
View file @
f46e5c73
...
...
@@ -46,7 +46,7 @@ enum VSC_level_e {
/* Define the vsc type structs */
#define VSC_DO(u,l,t) struct VSC_C_##l {
#define VSC_F(n,t,l,s,v,d,e) t n;
#define VSC_F(n,t,l,s,
f,
v,d,e) t n;
#define VSC_DONE(u,l,t) };
#include "tbl/vsc_all.h"
#undef VSC_DO
...
...
lib/libvarnishapi/vsc.c
View file @
f46e5c73
...
...
@@ -387,7 +387,7 @@ vsc_add_pt(struct vsc *vsc, const volatile void *ptr,
CHECK_OBJ_NOTNULL(vsc, VSC_MAGIC); \
st = vf->fantom.b;
#define VSC_F(nn,tt,ll,ss,vv,dd,ee) \
#define VSC_F(nn,tt,ll,ss,
ff,
vv,dd,ee) \
vsc_add_pt(vsc, &st->nn, descs++, vf);
#define VSC_DONE(U,l,t) \
...
...
@@ -437,7 +437,7 @@ vsc_build_pt_list(struct VSM_data *vd)
CHECK_OBJ_NOTNULL(vf, VSC_VF_MAGIC); \
if (!strcmp(vf->fantom.type, t)) \
iter_##l(vsc, VSC_desc_##l, vf);
#define VSC_F(n,t,l,s,v,d,e)
#define VSC_F(n,t,l,s,
f,
v,d,e)
#define VSC_DONE(a,b,c)
#include "tbl/vsc_all.h"
#undef VSC_DO
...
...
@@ -565,7 +565,7 @@ VSC_LevelDesc(unsigned level)
#undef VSC_TYPE_F
#define VSC_DO(U,l,t) const struct VSC_desc VSC_desc_##l[] = {
#define VSC_F(n,t,l,s,v,d,e) {#n,#t,s,d,e,&VSC_level_desc_##v},
#define VSC_F(n,t,l,s,
f,
v,d,e) {#n,#t,s,d,e,&VSC_level_desc_##v},
#define VSC_DONE(U,l,t) };
#include "tbl/vsc_all.h"
#undef VSC_DO
...
...
man/vsc2rst.c
View file @
f46e5c73
...
...
@@ -40,7 +40,7 @@
printf(x "\n", ##__VA_ARGS__)
#define VSC_LEVEL_F(v,l,e,d) \
printf("%s – %s\n\t%s\n\n", l, e, d);
#define VSC_F(n, t, l, s, v, d, e) \
#define VSC_F(n, t, l, s,
f,
v, d, e) \
printf("%s – %s (%s)\n\t%s\n\n", #n, e, VSC_level_##v, d);
int
main
(
int
argc
,
char
**
argv
)
...
...
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