ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/statgrab/statgrab.c
(Generate patch)

Comparing projects/libstatgrab/src/statgrab/statgrab.c (file contents):
Revision 1.4 by tdb, Wed Aug 27 20:54:19 2003 UTC vs.
Revision 1.5 by ats, Thu Aug 28 21:21:32 2003 UTC

# Line 415 | Line 415 | void usage() {
415                 "  -s         Display stat differences repeatedly\n"
416                 "  -o         Display stat differences once\n"
417                 "  -t DELAY   When repeating, wait DELAY seconds between updates (default 1)\n"
418 <               "  -p         Display CPU usage as percentages rather than absolute values\n"
418 >               "  -p         Display CPU usage differences as percentages rather than\n"
419 >               "             absolute values\n"
420                 "\n");
421          printf("Version %s - report bugs to <%s>.\n",
422 <                PACKAGE_VERSION, PACKAGE_BUGREPORT);
422 >               PACKAGE_VERSION, PACKAGE_BUGREPORT);
423          exit(1);
424   }
425  
# Line 464 | Line 465 | int main(int argc, char **argv) {
465          if (display_mode == DISPLAY_MRTG) {
466                  if ((argc - optind) != 2)
467                          die("mrtg mode: must specify exactly two stats");
468 <                if (repeat_mode != REPEAT_NONE)
468 >                if (repeat_mode == REPEAT_FOREVER)
469                          die("mrtg mode: cannot repeat display");
470          }
471 +
472 +        if (use_cpu_percent && repeat_mode == REPEAT_NONE)
473 +                die("CPU percentage usage display requires stat differences");
474  
475          switch (repeat_mode) {
476          case REPEAT_NONE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines