code: public static String generateClusterResTable(JobTracker tracker)
      throws IOException {
      ResourceReporter reporter = tracker.getResourceReporter();
      if (reporter == null) {
        return "";
      }
      StringBuffer sb = new StringBuffer();
      sb.append("<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n");
      sb.append("<tr>\n");
      sb.append("<th colspan=3>CPU</th>\n");
      sb.append("<th colspan=3>MEM</th>\n");
      sb.append("<th rowspan=2>Reported</th>\n");
      sb.append("</tr>\n");
      sb.append("<tr>\n");
      sb.append("<th>Total</th><th>Used</th><th>%</th>\n");
      sb.append("<th>Total</th><th>Used</th><th>%</th>\n");
      sb.append("</tr>\n");
      sb.append("<tr>\n");
      sb.append(String.format(
                "<td>%.1f GHz</td><td>%.1f GHz</td><td>%.1f%%</td>\n",
                reporter.getClusterCpuTotalGHz(),
                reporter.getClusterCpuUsageGHz(),
                Math.min(reporter.getClusterCpuUsageGHz() /
                         reporter.getClusterCpuTotalGHz() * 100D, 100D)));
      sb.append(String.format(
                "<td>%.1f GB</td><td>%.1f GB</td><td>%.1f%%</td><td>%d</td>\n",
                reporter.getClusterMemTotalGB(),
                reporter.getClusterMemUsageGB(),
                reporter.getClusterMemUsageGB() /
                reporter.getClusterMemTotalGB() * 100D,
                reporter.getReportedTaskTrackers()));
      sb.append("</tr>\n");
      sb.append("</table>\n");
      return sb.toString();
    }
docs: Method used to generate the cluster resource utilization table