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
7b1ef5b3
Commit
7b1ef5b3
authored
Apr 29, 2013
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trackrdrd: add global worker restart count to monitoring stats
parent
e819b329
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
monitor.c
trackrdrd/src/monitor.c
+6
-0
trackrdrd.h
trackrdrd/src/trackrdrd.h
+4
-1
worker.c
trackrdrd/src/worker.c
+1
-0
No files found.
trackrdrd/src/monitor.c
View file @
7b1ef5b3
...
...
@@ -63,6 +63,7 @@ log_output(void)
"sent=%u "
"reconnects=%u "
"failed=%u "
"restarts=%u "
"occ_hi=%u "
"occ_hi_this=%u "
,
dtbl
.
len
,
...
...
@@ -77,6 +78,7 @@ log_output(void)
dtbl
.
r_stats
.
sent
,
dtbl
.
r_stats
.
reconnects
,
dtbl
.
r_stats
.
failed
,
dtbl
.
r_stats
.
restarts
,
dtbl
.
r_stats
.
occ_hi
,
dtbl
.
r_stats
.
occ_hi_this
);
...
...
@@ -192,6 +194,10 @@ MON_StatsUpdate(stats_update_t update)
dtbl
.
w_stats
.
nodata
++
;
dtbl
.
r_stats
.
done
--
;
break
;
case
STATS_RESTART
:
dtbl
.
r_stats
.
restarts
++
;
break
;
default:
/* Unreachable */
...
...
trackrdrd/src/trackrdrd.h
View file @
7b1ef5b3
...
...
@@ -144,7 +144,8 @@ struct data_reader_stats_s {
unsigned
open
;
unsigned
sent
;
/* Sent successfully to MQ */
unsigned
failed
;
/* MQ send fails */
unsigned
reconnects
;
unsigned
reconnects
;
/* Reconnects to MQ */
unsigned
restarts
;
/* Worker thread restarts */
unsigned
occ_hi
;
/* Occupancy high water mark */
unsigned
occ_hi_this
;
/* Occupancy high water mark
this reporting interval*/
...
...
@@ -346,6 +347,8 @@ typedef enum {
STATS_OCCUPANCY
,
/* ReqEnd seen, no data in the record */
STATS_NODATA
,
/* Worker thread restarted */
STATS_RESTART
,
}
stats_update_t
;
void
*
MON_StatusThread
(
void
*
arg
);
...
...
trackrdrd/src/worker.c
View file @
7b1ef5b3
...
...
@@ -359,6 +359,7 @@ WRK_Restart(void)
wrk
->
deqs
=
wrk
->
waits
=
wrk
->
sends
=
wrk
->
fails
=
wrk
->
reconnects
=
0
;
wrk
->
restarts
++
;
MON_StatsUpdate
(
STATS_RESTART
);
wrk
->
state
=
WRK_NOTSTARTED
;
if
(
pthread_create
(
&
thread_data
[
i
].
worker
,
NULL
,
wrk_main
,
wrk
)
!=
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