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
977f15c4
Commit
977f15c4
authored
Mar 21, 2016
by
Arianna Aondio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add "last updated" timestamp for backend health in varnishadm
parent
67d57391
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
cache_backend_cfg.c
bin/varnishd/cache/cache_backend_cfg.c
+8
-5
No files found.
bin/varnishd/cache/cache_backend_cfg.c
View file @
977f15c4
...
...
@@ -324,6 +324,7 @@ static int __match_proto__()
do_list
(
struct
cli
*
cli
,
struct
backend
*
b
,
void
*
priv
)
{
int
*
probes
;
char
time_str
[
VTIM_FORMAT_SIZE
];
AN
(
priv
);
probes
=
priv
;
...
...
@@ -334,16 +335,17 @@ do_list(struct cli *cli, struct backend *b, void *priv)
VCLI_Out
(
cli
,
" %-10s"
,
b
->
admin_health
);
if
(
b
->
probe
==
NULL
)
VCLI_Out
(
cli
,
" %s"
,
"Healthy (no probe)"
);
VCLI_Out
(
cli
,
" %
-20
s"
,
"Healthy (no probe)"
);
else
{
if
(
b
->
healthy
)
VCLI_Out
(
cli
,
" %s"
,
"Healthy "
);
VCLI_Out
(
cli
,
" %
-20
s"
,
"Healthy "
);
else
VCLI_Out
(
cli
,
" %s"
,
"Sick "
);
VCLI_Out
(
cli
,
" %
-20
s"
,
"Sick "
);
VBP_Status
(
cli
,
b
,
*
probes
);
}
/* XXX: report b->health_changed */
VTIM_format
(
b
->
health_changed
,
time_str
);
VCLI_Out
(
cli
,
" %s"
,
time_str
);
return
(
0
);
}
...
...
@@ -367,7 +369,8 @@ cli_backend_list(struct cli *cli, const char * const *av, void *priv)
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
return
;
}
VCLI_Out
(
cli
,
"%-30s %-10s %s"
,
"Backend name"
,
"Admin"
,
"Probe"
);
VCLI_Out
(
cli
,
"%-30s %-10s %-20s %s"
,
"Backend name"
,
"Admin"
,
"Probe"
,
"Last updated"
);
(
void
)
backend_find
(
cli
,
av
[
2
],
do_list
,
&
probes
);
}
...
...
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