for (TabletServerStatus status : Monitor.getMmi().tServerInfo) {
sb.append("\n<server id='").append(status.name).append("'>\n");
sb.append("<lastContact>").append(System.currentTimeMillis() - status.lastContact).append("</lastContact>\n");
TableInfo summary = Monitor.summarizeTableStats(status);
sb.append("<compactions>\n");
sb.append("<major>").append("<running>").append(summary.major.running).append("</running>").append("<queued>").append(summary.major.queued)
.append("</queued>").append("</major>\n");
sb.append("<minor>").append("<running>").append(summary.minor.running).append("</running>").append("<queued>").append(summary.minor.queued)
.append("</queued>").append("</minor>\n");
sb.append("</compactions>\n");
sb.append("<tablets>").append(summary.tablets).append("</tablets>\n");
if (status.loggers != null) {
sb.append("<loggers>");
for (String logger : status.loggers)
sb.append("<logger>" + logger + "</logger>");
sb.append("</loggers>");
}
totalIngest += summary.ingestRate;
totalQuery += summary.queryRate;
totalEntries += summary.recs;
sb.append("</server>\n");
}
sb.append("\n</servers>\n");
sb.append("\n<tables>\n");
for (Entry<String,TableInfo> entry : tableStats.entrySet()) {
TableInfo tableInfo = entry.getValue();
sb.append("\n<table>\n");
sb.append("<tablename>").append(entry.getKey()).append("</tablename>\n");
sb.append("<tablets>").append(tableInfo.tablets).append("</tablets>\n");
sb.append("<onlineTablets>").append(tableInfo.onlineTablets).append("</onlineTablets>\n");