+ printf("%d:", CTDB_VERSION);
+ printf("%d:", (int)s->statistics_current_time.tv_sec);
+ printf("%d:", (int)s->statistics_start_time.tv_sec);
+ for (i=0;i<ARRAY_SIZE(fields);i++) {
+ printf("%d:", *(uint32_t *)(fields[i].offset+(uint8_t *)s));
+ }
+ printf("%d:", s->reclock.ctdbd.num);
+ printf("%.6f:", s->reclock.ctdbd.min);
+ printf("%.6f:", s->reclock.ctdbd.num?s->reclock.ctdbd.total/s->reclock.ctdbd.num:0.0);
+ printf("%.6f:", s->reclock.ctdbd.max);
+
+ printf("%d:", s->reclock.recd.num);
+ printf("%.6f:", s->reclock.recd.min);
+ printf("%.6f:", s->reclock.recd.num?s->reclock.recd.total/s->reclock.recd.num:0.0);
+ printf("%.6f:", s->reclock.recd.max);
+
+ printf("%d:", s->call_latency.num);
+ printf("%.6f:", s->call_latency.min);
+ printf("%.6f:", s->call_latency.num?s->call_latency.total/s->call_latency.num:0.0);
+ printf("%.6f:", s->call_latency.max);
+
+ printf("%d:", s->lockwait_latency.num);
+ printf("%.6f:", s->lockwait_latency.min);
+ printf("%.6f:", s->lockwait_latency.num?s->lockwait_latency.total/s->lockwait_latency.num:0.0);
+ printf("%.6f:", s->lockwait_latency.max);
+
+ printf("%d:", s->childwrite_latency.num);
+ printf("%.6f:", s->childwrite_latency.min);
+ printf("%.6f:", s->childwrite_latency.num?s->childwrite_latency.total/s->childwrite_latency.num:0.0);
+ printf("%.6f:", s->childwrite_latency.max);
+ printf("\n");
+ } else {
+ printf("CTDB version %u\n", CTDB_VERSION);
+ printf("Current time of statistics : %s", ctime(&s->statistics_current_time.tv_sec));
+ printf("Statistics collected since : (%03d %02d:%02d:%02d) %s", days, hours, minutes, seconds, ctime(&s->statistics_start_time.tv_sec));
+
+ for (i=0;i<ARRAY_SIZE(fields);i++) {
+ if (strchr(fields[i].name, '.')) {
+ preflen = strcspn(fields[i].name, ".")+1;
+ if (!prefix || strncmp(prefix, fields[i].name, preflen) != 0) {
+ prefix = fields[i].name;
+ printf(" %*.*s\n", preflen-1, preflen-1, fields[i].name);
+ }
+ } else {
+ preflen = 0;
+ }
+ printf(" %*s%-22s%*s%10u\n",
+ preflen?4:0, "",
+ fields[i].name+preflen,
+ preflen?0:4, "",
+ *(uint32_t *)(fields[i].offset+(uint8_t *)s));
+ }
+ printf(" %-30s %.6f/%.6f/%.6f sec out of %d\n", "reclock_ctdbd MIN/AVG/MAX", s->reclock.ctdbd.min, s->reclock.ctdbd.num?s->reclock.ctdbd.total/s->reclock.ctdbd.num:0.0, s->reclock.ctdbd.max, s->reclock.ctdbd.num);