diff options
author | Mark Wong <mark@2ndQuadrant.com> | 2020-04-03 23:48:07 +0000 |
---|---|---|
committer | Mark Wong <mark@2ndQuadrant.com> | 2020-04-04 03:03:46 +0000 |
commit | df22c1dba02aa7acb9ec62a61c22711761ceec46 (patch) | |
tree | 39151b5f3128b4bd99eea89f7526301a6663e9ea | |
parent | e2a0ec144120cf61cd946d39be7a266ae4142281 (diff) |
Fix command line handling of display counts
With minor updates in usage() output to match the command line text
with the options test.
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | pg_top.c | 6 |
2 files changed, 5 insertions, 3 deletions
@@ -18,6 +18,8 @@ Release 4.0.0 * Show swapping activity * Simplify top I/O display * Remove toggle for display raw I/O statistics + * Fix bug for specifing number of displays to show on the command line + without -x flag Release 3.7.0 @@ -135,8 +135,8 @@ usage(const char *progname) { printf("%s monitors a PostgreSQL database cluster.\n\n", progname); printf("Usage:\n"); - printf(" %s [OPTION]... [NUMBER]\n", progname); - printf("\nOptions:\n"); + printf(" %s [OPTION]... [COUNT]\n", progname); + printf("\nGeneral options:\n"); printf(" -b, --batch use batch mode\n"); printf(" -c, --show-command display command name of each process\n"); printf(" -C, --color-mode turn off color mode\n"); @@ -770,7 +770,7 @@ main(int argc, char *argv[]) } else { - pgtctx.topn = i; + pgtctx.displays = i; } } |