Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recovery status reported for any status other than COMPLETE #41

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions utils/ltop.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,9 @@ _update_display_top (WINDOW *win, char *fs, List ost_data, List mdt_data,
* recovery_status is just a string, and has no timestamp.
*/
if ((tnow - m->common.tgt_metric_timestamp) < stale_secs) {
if (m->common.recov_status && strstr(m->common.recov_status,"RECOV")) {
if (m->common.recov_status &&
!strstr(m->common.recov_status,"COMPLETE") &&
!strstr(m->common.recov_status,"INACTIVE")) {
/*
* Multiple MDTs may be in recovery, but display room
* is limited. We print the full status of the first
Expand Down Expand Up @@ -1182,8 +1184,8 @@ _update_display_mdt (WINDOW *win, int line, void *target, int stale_secs,
// available info is expired
mvwprintw (win, line, 0, "%4.4s data is stale", m->common.name);
} else if (m->common.recov_status &&
strstr(m->common.recov_status,"RECOV")) {
/* mdt is in recovery - display recovery stats */
!strstr(m->common.recov_status,"COMPLETE")) {
/* mdt is in recovery or not running - display recovery stats */
mvwprintw (win, line, 0, "%4.4s %10.10s %s",
m->common.name, _ltrunc (m->common.servername, 10),
m->common.recov_status);
Expand Down Expand Up @@ -1223,13 +1225,12 @@ _update_display_ost (WINDOW *win, int line, void *target, int stale_secs,
mvwprintw (win, line, 0, "%4.4s %1.1s data is stale",
o->common.name, o->common.tgtstate);
/* ost is in recovery - display recovery stats */
} else if (strncmp (o->common.recov_status, "COMPLETE", 8) != 0
&& strncmp (o->common.recov_status, "INACTIVE", 8) != 0) {
} else if (strncmp (o->common.recov_status, "COMPLETE", 8) != 0) {
mvwprintw (win, line, 0, "%4.4s %1.1s %10.10s %s",
o->common.name, o->common.tgtstate,
_ltrunc (o->common.servername, 10),
o->common.recov_status);
/* ost is not in recover (state == INACTIVE|COMPLETE) */
/* ost is not in running (state == COMPLETE) */
} else {
mvwprintw (win, line, 0, "%4.4s %1.1s %10.10s"
" %5.0f %4.0f %5.0f %5.0f %5.0f %7.0f %4.0f %4.0f"
Expand Down