diff --git a/src/pmatop/pmatop.py b/src/pmatop/pmatop.py index 2ecf8a9..2f8f7d1 100644 --- a/src/pmatop/pmatop.py +++ b/src/pmatop/pmatop.py @@ -708,7 +708,7 @@ class _Options(object): opts = pmapi.pmOptions() opts.pmSetOptionCallback(self.option_callback) opts.pmSetOverrideCallback(self.override) - opts.pmSetShortOptions("-gmw:r:L:h:V?") + opts.pmSetShortOptions("gmw:r:L:h:V?") opts.pmSetLongOptionHeader("Options") opts.pmSetLongOption("generic", 0, 'g', '', "Display generic metrics") opts.pmSetLongOption("memory", 0, 'm', '', "Display memory metrics") diff --git a/src/pmcollectl/pmcollectl.py b/src/pmcollectl/pmcollectl.py index 7bc4765..d6e3dd5 100755 --- a/src/pmcollectl/pmcollectl.py +++ b/src/pmcollectl/pmcollectl.py @@ -514,7 +514,7 @@ class _Options(object): opts = pmapi.pmOptions() opts.pmSetOptionCallback(self.option_callback) opts.pmSetOverrideCallback(self.override) - opts.pmSetShortOptions("vp:c:f:R:i:s:h:") + opts.pmSetShortOptions("vp:c:f:R:i:s:h:?") opts.pmSetLongOptionHeader("Options") opts.pmSetLongOption("verbose", 0, 'v', '', "Produce verbose output") opts.pmSetLongOption("playback", 0, 'p', '', "Read sample data from file") @@ -523,7 +523,7 @@ class _Options(object): opts.pmSetLongOption("runtime", 1, 'R', 'N', "How long to take samples") opts.pmSetLongOption("interval", 1, 'i', 'N', "The sample time interval") opts.pmSetLongOption("subsys", 1, 's', 'SUBSYS', "The subsystem to sample") - opts.pmSetLongOption("host", 1, 'h', 'HOST', "The host that is the metric source") + opts.pmSetLongOptionHost() opts.pmSetLongOptionVersion() opts.pmSetLongOptionHelp() return opts @@ -576,7 +576,7 @@ class _Options(object): self.interval_arg = self.opts.pmGetOptionInterval() elif opt == 'c': self.opts.pmSetOptionSamples(optarg) - self.n_samples = into(self.opts.pmGetOptionSamples()) + self.n_samples = int(self.opts.pmGetOptionSamples()) elif opt == 'h': self.host = optarg