Print this page
1100 cpustat usage message is incorrect

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cpc/common/cpustat.c
          +++ new/usr/src/cmd/cpc/common/cpustat.c
↓ open down ↓ 243 lines elided ↑ open up ↑
 244  244                  errcnt++;
 245  245                  break;
 246  246          }
 247  247  
 248  248          if (opts->nsamples == 0 || opts->mseconds == 0)
 249  249                  errcnt++;
 250  250  
 251  251          if (errcnt != 0 || opts->dohelp ||
 252  252              (opts->nsets = cpc_setgrp_numsets(opts->master)) == 0) {
 253  253                  (void) fprintf(opts->dohelp ? stdout : stderr, gettext(
 254      -                    "Usage:\n\t%s [-c events] [-p period] [-nstD] "
 255      -                    "[-T d|u] [interval [count]]\n\n"
      254 +                    "Usage:\n\t%s -c events [-c events]... [-p period] [-nstD] "
      255 +                    "[-T d|u] [interval [count]]\n\t%s -h\n\n"
 256  256                      "\t-c events specify processor events to be monitored\n"
 257  257                      "\t-n\t  suppress titles\n"
 258  258                      "\t-p period cycle through event list periodically\n"
 259  259                      "\t-s\t  run user soaker thread for system-only events\n"
 260  260                      "\t-t\t  include %s register\n"
 261  261                      "\t-T d|u\t  Display a timestamp in date (d) or unix "
 262  262                      "time_t (u)\n"
 263  263                      "\t-D\t  enable debug mode\n"
 264  264                      "\t-h\t  print extended usage information\n\n"
 265  265                      "\tUse cputrack(1) to monitor per-process statistics.\n"),
 266      -                    opts->pgmname, CPC_TICKREG_NAME);
      266 +                    opts->pgmname, opts->pgmname, CPC_TICKREG_NAME);
 267  267                  if (opts->dohelp) {
 268  268                          (void) putchar('\n');
 269  269                          (void) capabilities(cpc, stdout);
 270  270                          exit(0);
 271  271                  }
 272  272                  exit(2);
 273  273          }
 274  274  
 275  275          /*
 276  276           * If the user requested periodic behavior, calculate the rest time
↓ open down ↓ 577 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX