summaryrefslogtreecommitdiffstats
path: root/ctdb/tools/ctdb.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2009-10-29 10:37:10 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-10-29 10:37:10 +1100
commit279b7ca56402e871ae5ee5c0a9d590f606f68928 (patch)
tree6ee5bc09bf260f477fdafa32c5f2a9163036e035 /ctdb/tools/ctdb.c
parent2419eab0d97cce9454d2b5c51ef2c52479f95c50 (diff)
downloadsamba-279b7ca56402e871ae5ee5c0a9d590f606f68928.tar.gz
samba-279b7ca56402e871ae5ee5c0a9d590f606f68928.tar.xz
samba-279b7ca56402e871ae5ee5c0a9d590f606f68928.zip
update the "uptime" command to indicate the "time since last" is the time since the last recovery OR failover.
(This used to be ctdb commit 3b0d44497800a16400d05a30bdaf6e6c285d4b36)
Diffstat (limited to 'ctdb/tools/ctdb.c')
-rw-r--r--ctdb/tools/ctdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index bad4450103..c1fe88c535 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -318,7 +318,7 @@ static int control_uptime(struct ctdb_context *ctdb, int argc, const char **argv
}
if (options.machinereadable){
- printf(":Current Node Time:Ctdb Start Time:Last Recovery Time:Last Recovery Duration:\n");
+ printf(":Current Node Time:Ctdb Start Time:Last Recovery/Failover Time:Last Recovery/IPFailover Duration:\n");
printf(":%u:%u:%u:%lf\n",
(unsigned int)uptime->current_time.tv_sec,
(unsigned int)uptime->ctdbd_start_time.tv_sec,
@@ -329,7 +329,7 @@ static int control_uptime(struct ctdb_context *ctdb, int argc, const char **argv
return 0;
}
- printf("Current time of node : %s", ctime(&uptime->current_time.tv_sec));
+ printf("Current time of node : %s", ctime(&uptime->current_time.tv_sec));
tmp = uptime->current_time.tv_sec - uptime->ctdbd_start_time.tv_sec;
seconds = tmp%60;
@@ -339,7 +339,7 @@ static int control_uptime(struct ctdb_context *ctdb, int argc, const char **argv
hours = tmp%24;
tmp /= 24;
days = tmp;
- printf("Ctdbd start time : (%03d %02d:%02d:%02d) %s", days, hours, minutes, seconds, ctime(&uptime->ctdbd_start_time.tv_sec));
+ printf("Ctdbd start time : (%03d %02d:%02d:%02d) %s", days, hours, minutes, seconds, ctime(&uptime->ctdbd_start_time.tv_sec));
tmp = uptime->current_time.tv_sec - uptime->last_recovery_finished.tv_sec;
seconds = tmp%60;
@@ -349,9 +349,9 @@ static int control_uptime(struct ctdb_context *ctdb, int argc, const char **argv
hours = tmp%24;
tmp /= 24;
days = tmp;
- printf("Time of last recovery : (%03d %02d:%02d:%02d) %s", days, hours, minutes, seconds, ctime(&uptime->last_recovery_finished.tv_sec));
+ printf("Time of last recovery/failover: (%03d %02d:%02d:%02d) %s", days, hours, minutes, seconds, ctime(&uptime->last_recovery_finished.tv_sec));
- printf("Duration of last recovery : %lf seconds\n",
+ printf("Duration of last recovery/failover: %lf seconds\n",
timeval_delta(&uptime->last_recovery_finished,
&uptime->last_recovery_started));