private Options getOptions() {
    Options opts = new Options();
    opts.addOption("h", "help", false, "Print usage; for help while the tool is running press 'h'");
    opts.addOption("d", "delay", true, "The refresh delay (in seconds); default is 3 seconds");
    opts.addOption("m", "mode", true,
      "The mode; n (Namespace)|t (Table)|r (Region)|s (RegionServer)|u (User)"
        + "|c (Client), default is r");
    opts.addOption("n", "numberOfIterations", true, "The number of iterations");
    opts.addOption("s", "sortField", true,
      "The initial sort field. You can prepend a `+' or `-' to the field name to also override"
        + " the sort direction. A leading `+' will force sorting high to low, whereas a `-' will"
        + " ensure a low to high ordering");
    opts.addOption("O", "outputFieldNames", false,
      "Print each of the available field names on a separate line, then quit");
    opts.addOption("f", "fields", true,
      "Show only the given fields. Specify comma separated fields to show multiple fields");
    opts.addOption("i", "filters", true,
      "The initial filters. Specify comma separated filters to set multiple filters");
    opts.addOption("b", "batchMode", false,
      "Starts hbtop in Batch mode, which could be useful for sending output from hbtop to other"
        + " programs or to a file. In this mode, hbtop will not accept input and runs until the"
        + " iterations limit you've set with the `-n' command-line option or until killed");
    return opts;
  }
A real-time monitoring tool for HBase like Unix top command.
hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/HBTop.java