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
b922ac98
Commit
b922ac98
authored
Jan 07, 2013
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add MGT.child_{start|exit|stop|died|dump|panic} counters
parent
eeef8c2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
mgt_child.c
bin/varnishd/mgt/mgt_child.c
+8
-0
vsc_fields.h
include/tbl/vsc_fields.h
+25
-0
No files found.
bin/varnishd/mgt/mgt_child.c
View file @
b922ac98
...
...
@@ -401,6 +401,7 @@ mgt_launch_child(struct cli *cli)
}
assert
(
pid
>
1
);
REPORT
(
LOG_NOTICE
,
"child (%jd) Started"
,
(
intmax_t
)
pid
);
VSC_C_mgt
->
child_start
=
++
static_VSC_C_mgt
.
child_start
;
/* Close stuff the child got */
closex
(
&
heritage
.
std_fd
);
...
...
@@ -511,15 +512,21 @@ mgt_reap_child(void)
if
(
WIFEXITED
(
status
)
&&
WEXITSTATUS
(
status
))
{
VSB_printf
(
vsb
,
" status=%d"
,
WEXITSTATUS
(
status
));
exit_status
|=
0x20
;
if
(
WEXITSTATUS
(
status
)
==
1
)
VSC_C_mgt
->
child_exit
=
++
static_VSC_C_mgt
.
child_exit
;
else
VSC_C_mgt
->
child_stop
=
++
static_VSC_C_mgt
.
child_stop
;
}
if
(
WIFSIGNALED
(
status
))
{
VSB_printf
(
vsb
,
" signal=%d"
,
WTERMSIG
(
status
));
exit_status
|=
0x40
;
VSC_C_mgt
->
child_died
=
++
static_VSC_C_mgt
.
child_died
;
}
#ifdef WCOREDUMP
if
(
WCOREDUMP
(
status
))
{
VSB_printf
(
vsb
,
" (core dumped)"
);
exit_status
|=
0x80
;
VSC_C_mgt
->
child_dump
=
++
static_VSC_C_mgt
.
child_dump
;
}
#endif
AZ
(
VSB_finish
(
vsb
));
...
...
@@ -530,6 +537,7 @@ mgt_reap_child(void)
if
(
heritage
.
panic_str
[
0
]
!=
'\0'
)
{
mgt_panic_record
(
r
);
mgt_SHM_Destroy
(
1
);
VSC_C_mgt
->
child_panic
=
++
static_VSC_C_mgt
.
child_panic
;
}
else
{
mgt_SHM_Destroy
(
0
);
}
...
...
include/tbl/vsc_fields.h
View file @
b922ac98
...
...
@@ -65,6 +65,31 @@ VSC_F(uptime, uint64_t, 0, 'c',
"Management process uptime"
,
"Uptime in seconds of the management process"
)
VSC_F
(
child_start
,
uint64_t
,
0
,
'c'
,
"Child process started"
,
"Number of times the child process has been started"
)
VSC_F
(
child_exit
,
uint64_t
,
0
,
'c'
,
"Child process normal exit"
,
"Number of times the child process has been cleanly stopped"
)
VSC_F
(
child_stop
,
uint64_t
,
0
,
'c'
,
"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'
,
"Child process died (signal)"
,
"Number of times the child process has died due to signals"
)
VSC_F
(
child_dump
,
uint64_t
,
0
,
'c'
,
"Child process core dumped"
,
"Number of times the child process has produced core dumps"
)
VSC_F
(
child_panic
,
uint64_t
,
0
,
'c'
,
"Child process panic"
,
"Number of times the management process has caught a child panic"
)
#endif
...
...
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