Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
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
trackrdrd
Commits
320175f3
Commit
320175f3
authored
Apr 30, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor thread emits more stats about worker threads
parent
25c05ad0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
monitor.c
src/monitor.c
+17
-10
No files found.
src/monitor.c
View file @
320175f3
...
...
@@ -42,10 +42,10 @@ static int run;
static
pthread_mutex_t
mutex
;
static
unsigned
occ
;
static
unsigned
sent
;
/* Sent successfully to MQ */
static
unsigned
failed
;
/* MQ send fails */
static
unsigned
reconnects
;
/* Reconnects to MQ */
static
unsigned
restarts
;
/* Worker thread restarts */
static
unsigned
long
sent
;
/* Sent successfully to MQ */
static
unsigned
long
failed
;
/* MQ send fails */
static
unsigned
long
reconnects
;
/* Reconnects to MQ */
static
unsigned
long
restarts
;
/* Worker thread restarts */
static
unsigned
occ_hi
;
/* Occupancy high water mark */
static
unsigned
occ_hi_this
;
/* Occupancy high water mark
this reporting interval*/
...
...
@@ -53,7 +53,12 @@ static unsigned occ_hi_this; /* Occupancy high water mark
static
void
log_output
(
void
)
{
int
wrk_running
=
WRK_Running
();
static
int
wrk_running_hi
=
0
;
int
wrk_active
=
WRK_Running
();
int
wrk_running
=
wrk_active
-
spmcq_datawaiter
;
if
(
wrk_running
>
wrk_running_hi
)
wrk_running_hi
=
wrk_running
;
LOG_Log
(
LOG_INFO
,
"Data table: len=%u occ=%u occ_hi=%u occ_hi_this=%u "
"global_free=%u"
,
...
...
@@ -64,13 +69,15 @@ log_output(void)
RDR_Stats
();
#endif
if
(
wrk_
running
<
config
.
nworkers
)
LOG_Log
(
LOG_WARNING
,
"%d of %d workers
running
"
,
wrk_running
,
if
(
wrk_
active
<
config
.
nworkers
)
LOG_Log
(
LOG_WARNING
,
"%d of %d workers
active
"
,
wrk_running
,
config
.
nworkers
);
/* XXX: seen, bytes sent */
LOG_Log
(
LOG_INFO
,
"Workers: running=%d sent=%lu failed=%u reconnects=%u "
"restarts=%u abandoned=%u"
,
wrk_running
,
sent
,
failed
,
reconnects
,
restarts
,
failed
,
abandoned
);
LOG_Log
(
LOG_INFO
,
"Workers: active=%d running=%d waiting=%d running_hi=%d "
"exited=%d abandoned=%u reconnects=%lu restarts=%lu sent=%lu "
"failed=%lu"
,
wrk_active
,
wrk_running
,
spmcq_datawaiter
,
wrk_running_hi
,
WRK_Exited
(),
abandoned
,
reconnects
,
restarts
,
sent
,
failed
);
/* locking would be overkill */
occ_hi_this
=
0
;
...
...
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