diff options
Diffstat (limited to 'cli/src')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index da66af6a312..434e9a6b13c 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -5801,6 +5801,9 @@ cmd_heal_volume_brick_out (dict_t *dict, int brick) char *path = NULL; char *status = NULL; uint64_t i = 0; + uint32_t time = 0; + char timestr[256]; + struct tm *tm = NULL; snprintf (key, sizeof (key), "%d-hostname", brick); ret = dict_get_str (dict, key, &hostname); @@ -5823,7 +5826,21 @@ cmd_heal_volume_brick_out (dict_t *dict, int brick) ret = dict_get_str (dict, key, &path); if (ret) continue; - cli_out ("%s", path); + time = 0; + snprintf (key, sizeof (key), "%d-%"PRIu64"-time", brick, i); + ret = dict_get_uint32 (dict, key, &time); + if (!time) { + cli_out ("%s", path); + } else { + tm = localtime ((time_t*)(&time)); + strftime (timestr, sizeof (timestr), + "%Y-%m-%d %H:%M:%S", tm); + if (i ==0) { + cli_out ("at path on brick"); + cli_out ("-----------------------------------"); + } + cli_out ("%s %s", timestr, path); + } } out: return; |