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
285036ab
Commit
285036ab
authored
Mar 14, 2013
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add verbosity filter to interactive varnishstat
Show UNSEEN in bottom bar when not hiding unseened counters
parent
4cf3e419
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
varnishstat_curses.c
bin/varnishstat/varnishstat_curses.c
+19
-1
No files found.
bin/varnishstat/varnishstat_curses.c
View file @
285036ab
...
@@ -113,6 +113,7 @@ static WINDOW *w_points = NULL;
...
@@ -113,6 +113,7 @@ static WINDOW *w_points = NULL;
static
WINDOW
*
w_bar_b
=
NULL
;
static
WINDOW
*
w_bar_b
=
NULL
;
static
WINDOW
*
w_info
=
NULL
;
static
WINDOW
*
w_info
=
NULL
;
static
int
verbosity
=
VSC_level_info
;
static
int
keep_running
=
1
;
static
int
keep_running
=
1
;
static
int
show_info
=
1
;
static
int
show_info
=
1
;
static
int
hide_unseen
=
1
;
static
int
hide_unseen
=
1
;
...
@@ -198,6 +199,8 @@ build_pt_array(void)
...
@@ -198,6 +199,8 @@ build_pt_array(void)
CHECK_OBJ_NOTNULL
(
pt
,
PT_MAGIC
);
CHECK_OBJ_NOTNULL
(
pt
,
PT_MAGIC
);
if
(
!
pt
->
seen
&&
hide_unseen
)
if
(
!
pt
->
seen
&&
hide_unseen
)
continue
;
continue
;
if
(
pt
->
vpt
->
desc
->
level
->
verbosity
>
verbosity
)
continue
;
assert
(
n_ptarray
<
n_ptlist
);
assert
(
n_ptarray
<
n_ptlist
);
ptarray
[
n_ptarray
++
]
=
pt
;
ptarray
[
n_ptarray
++
]
=
pt
;
}
}
...
@@ -722,11 +725,13 @@ draw_points(void)
...
@@ -722,11 +725,13 @@ draw_points(void)
static
void
static
void
draw_bar_b
(
void
)
draw_bar_b
(
void
)
{
{
int
x
;
int
x
,
X
;
const
struct
VSC_level_desc
*
level
;
AN
(
w_bar_b
);
AN
(
w_bar_b
);
x
=
0
;
x
=
0
;
X
=
getmaxx
(
w_bar_b
);
werase
(
w_bar_b
);
werase
(
w_bar_b
);
if
(
page_start
+
l_points
<
n_ptarray
)
if
(
page_start
+
l_points
<
n_ptarray
)
mvwaddch
(
w_bar_b
,
0
,
x
,
ACS_DARROW
);
mvwaddch
(
w_bar_b
,
0
,
x
,
ACS_DARROW
);
...
@@ -734,6 +739,13 @@ draw_bar_b(void)
...
@@ -734,6 +739,13 @@ draw_bar_b(void)
if
(
current
<
n_ptarray
-
1
)
if
(
current
<
n_ptarray
-
1
)
mvwprintw
(
w_bar_b
,
0
,
x
,
"%s"
,
ptarray
[
current
]
->
name
);
mvwprintw
(
w_bar_b
,
0
,
x
,
"%s"
,
ptarray
[
current
]
->
name
);
level
=
VSC_LevelDesc
(
verbosity
);
if
(
level
!=
NULL
)
mvwprintw
(
w_bar_b
,
0
,
X
-
7
,
"%7s"
,
level
->
label
);
X
-=
7
;
if
(
!
hide_unseen
)
mvwprintw
(
w_bar_b
,
0
,
X
-
6
,
"%6s"
,
"UNSEEN"
);
wnoutrefresh
(
w_bar_b
);
wnoutrefresh
(
w_bar_b
);
}
}
...
@@ -801,6 +813,12 @@ handle_keypress(int ch)
...
@@ -801,6 +813,12 @@ handle_keypress(int ch)
hide_unseen
=
1
-
hide_unseen
;
hide_unseen
=
1
-
hide_unseen
;
rebuild
=
1
;
rebuild
=
1
;
break
;
break
;
case
'v'
:
verbosity
++
;
if
(
VSC_LevelDesc
(
verbosity
)
==
NULL
)
verbosity
=
0
;
rebuild
=
1
;
break
;
case
'q'
:
case
'q'
:
case
'Q'
:
case
'Q'
:
keep_running
=
0
;
keep_running
=
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