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
11ff92f3
Commit
11ff92f3
authored
Nov 30, 2012
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trackrdrd: added config param monitor.workers
parent
5b595f9f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
+25
-2
config.c
trackrdrd/src/config.c
+21
-0
monitor.c
trackrdrd/src/monitor.c
+2
-1
regress.sh
trackrdrd/src/test/regress.sh
+1
-1
trackrdrd.h
trackrdrd/src/trackrdrd.h
+1
-0
No files found.
trackrdrd/src/config.c
View file @
11ff92f3
...
...
@@ -40,6 +40,7 @@
#include <math.h>
#include <unistd.h>
#include <pwd.h>
#include <stdbool.h>
#include "trackrdrd.h"
#include "libvarnish.h"
...
...
@@ -152,6 +153,24 @@ CONF_Add(const char *lval, const char *rval)
return
(
0
);
}
if
(
strcmp
(
lval
,
"monitor.workers"
)
==
0
)
{
if
(
strcasecmp
(
rval
,
"true"
)
==
0
||
strcasecmp
(
rval
,
"on"
)
==
0
||
strcasecmp
(
rval
,
"yes"
)
==
0
||
strcmp
(
rval
,
"1"
)
==
0
)
{
config
.
monitor_workers
=
true
;
return
(
0
);
}
if
(
strcasecmp
(
rval
,
"false"
)
==
0
||
strcasecmp
(
rval
,
"off"
)
==
0
||
strcasecmp
(
rval
,
"no"
)
==
0
||
strcmp
(
rval
,
"0"
)
==
0
)
{
config
.
monitor_workers
=
false
;
return
(
0
);
}
return
(
EINVAL
);
}
return
EINVAL
;
}
...
...
@@ -190,6 +209,7 @@ CONF_Init(void)
config
.
varnish_bindump
[
0
]
=
'\0'
;
config
.
syslog_facility
=
LOG_LOCAL0
;
config
.
monitor_interval
=
30
;
config
.
monitor_workers
=
false
;
config
.
processor_log
[
0
]
=
'\0'
;
config
.
maxopen_scale
=
0
;
config
.
maxdata_scale
=
0
;
...
...
@@ -270,6 +290,7 @@ CONF_Dump(void)
confdump
(
"varnish.bindump = %s"
,
config
.
varnish_bindump
);
confdump
(
"syslog.facility = %s"
,
config
.
syslog_facility_name
);
confdump
(
"monitor.interval = %.1f"
,
config
.
monitor_interval
);
confdump
(
"monitor.workers = %s"
,
config
.
monitor_workers
?
"true"
:
"false"
);
confdump
(
"processor.log = %s"
,
config
.
processor_log
);
confdump
(
"maxopen.scale = %d"
,
config
.
maxopen_scale
);
confdump
(
"maxdata.scale = %d"
,
config
.
maxdata_scale
);
...
...
trackrdrd/src/monitor.c
View file @
11ff92f3
...
...
@@ -78,7 +78,8 @@ void
tbl
.
len_overflows
,
tbl
.
data_overflows
,
tbl
.
occ_hi
,
tbl
.
seen
,
tbl
.
submitted
,
tbl
.
nodata
,
tbl
.
sent
,
tbl
.
failed
,
tbl
.
wait_qfull
,
tbl
.
data_hi
);
WRK_Stats
();
if
(
config
.
monitor_workers
)
WRK_Stats
();
}
LOG_Log0
(
LOG_INFO
,
"Monitoring thread exiting"
);
...
...
trackrdrd/src/test/regress.sh
View file @
11ff92f3
...
...
@@ -22,7 +22,7 @@ CMD="../trackrdrd -D -f varnish.binlog -l - -d -c test.conf"
# the user running it
CKSUM
=
$(
$CMD
|
sed
-e
's/\(initializing\) \(.*\)/\1/'
|
sed
-e
's/\(Running as\) \([a-zA-Z0-9]*\)$/\1/'
|
grep
-v
'Not running as root'
|
cksum
)
if
[
"
$CKSUM
"
!=
'
2398306240 232246
'
]
;
then
if
[
"
$CKSUM
"
!=
'
718198351 232285
'
]
;
then
echo
"ERROR: Regression test incorrect cksum:
$CKSUM
"
exit
1
fi
...
...
trackrdrd/src/trackrdrd.h
View file @
11ff92f3
...
...
@@ -152,6 +152,7 @@ struct config {
int
syslog_facility
;
char
syslog_facility_name
[
BUFSIZ
];
double
monitor_interval
;
bool
monitor_workers
;
char
processor_log
[
BUFSIZ
];
unsigned
maxopen_scale
;
unsigned
maxdata_scale
;
...
...
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