Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent3
Commits
0711e54a
Commit
0711e54a
authored
Jan 30, 2013
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
varnishevent - data table stats are global
parent
b6fd4487
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
16 deletions
+14
-16
data.c
bin/varnishevent/data.c
+1
-4
monitor.c
bin/varnishevent/monitor.c
+5
-5
varnishevent.c
bin/varnishevent/varnishevent.c
+4
-4
varnishevent.h
bin/varnishevent/varnishevent.h
+4
-3
No files found.
bin/varnishevent/data.c
View file @
0711e54a
...
...
@@ -44,9 +44,6 @@ static const char *statename[3] = { "EMPTY", "OPEN", "DONE" };
static
pthread_mutex_t
freelist_lock
;
static
char
*
bufptr
;
#define C(spec) ((spec) & VSL_S_CLIENT)
#define B(spec) ((spec) & VSL_S_BACKEND)
#if 0
static void
data_Cleanup(void)
...
...
@@ -114,7 +111,7 @@ DATA_Init(void)
}
AZ
(
pthread_mutex_init
(
&
freelist_lock
,
&
attr_lock
));
global_nfree
=
0
;
data_open
=
data_done
=
data_occ_hi
=
global_nfree
=
0
;
return
(
0
);
}
...
...
bin/varnishevent/monitor.c
View file @
0711e54a
...
...
@@ -46,9 +46,9 @@ static void
log_output
(
void
)
{
LOG_Log
(
LOG_INFO
,
"Data table: len=%u open=%u done=%u load=%.2f occ_hi=%u "
"global_free=%u"
,
config
.
max_data
,
logline
->
open
,
logline
->
done
,
100
.
0
*
(
logline
->
open
+
logline
->
done
)
/
config
.
max_data
,
logline
->
occ_hi
,
global_nfree
);
"global_free=%u"
,
config
.
max_data
,
data_open
,
data_
done
,
100
.
0
*
(
data_open
+
data_
done
)
/
config
.
max_data
,
data_
occ_hi
,
global_nfree
);
RDR_Stats
();
...
...
@@ -108,11 +108,11 @@ MON_StatsUpdate(stats_update_t update)
switch
(
update
)
{
case
STATS_WRITTEN
:
logline
->
done
--
;
data_
done
--
;
break
;
case
STATS_DONE
:
logline
->
done
++
;
data_
done
++
;
break
;
default:
...
...
bin/varnishevent/varnishevent.c
View file @
0711e54a
...
...
@@ -298,9 +298,9 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
/* XXX: assert that all lp->tag[i].len == 0 ? */
fd_tbl
[
fd
].
ll
=
lp
;
lp
->
state
=
DATA_OPEN
;
logline
->
open
++
;
if
(
logline
->
open
+
logline
->
done
>
logline
->
occ_hi
)
logline
->
occ_hi
=
logline
->
open
+
logline
->
done
;
data_
open
++
;
if
(
data_open
+
data_done
>
data_
occ_hi
)
data_occ_hi
=
data_open
+
data_
done
;
fd_tbl
[
fd
].
state
=
FD_OPEN
;
seen
++
;
open
++
;
...
...
@@ -320,7 +320,7 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
lp
->
state
=
DATA_DONE
;
if
(
lp
->
state
==
DATA_DONE
)
{
logline
->
open
--
;
data_
open
--
;
if
((
m_flag
&&
!
VSL_Matched
(
vd
,
lp
->
bitmap
))
||
(
lp
->
spec
&&
!
(
lp
->
spec
&
cb_flag
)))
{
not_logged
++
;
...
...
bin/varnishevent/varnishevent.h
View file @
0711e54a
...
...
@@ -93,13 +93,14 @@ typedef struct logline_t {
hdr_t
vcl_log
;
/* VCL_Log entries */
VSTAILQ_ENTRY
(
logline_t
)
freelist
;
VSTAILQ_ENTRY
(
logline_t
)
spscq
;
unsigned
open
;
unsigned
done
;
unsigned
occ_hi
;
}
logline_t
;
logline_t
*
logline
;
unsigned
data_open
;
unsigned
data_done
;
unsigned
data_occ_hi
;
VSTAILQ_HEAD
(
freehead_s
,
logline_t
);
struct
freehead_s
freehead
;
...
...
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