diff --git a/src/pcp/iostat/pcp-iostat.py b/src/pcp/iostat/pcp-iostat.py index e71de7add..45004da07 100755 --- a/src/pcp/iostat/pcp-iostat.py +++ b/src/pcp/iostat/pcp-iostat.py @@ -151,8 +151,8 @@ def report(self, manager): headfmtquspace=precision+6 if "t" in IostatOptions.xflag: - headfmt = "%-24s %-12s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s" - valfmt = "%-24s %-12s %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f" + headfmt = "%-28s %-12s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s" + valfmt = "%-28s %-12s %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f" else: headfmt = "%-12s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s" valfmt = "%-12s %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f %*.*f" diff --git a/src/python/pcp/pmcc.py b/src/python/pcp/pmcc.py index 0117b262e..cc2587f37 100644 --- a/src/python/pcp/pmcc.py +++ b/src/python/pcp/pmcc.py @@ -618,11 +618,16 @@ def run(self): try: self.fetch() while True: - self._counter += 1 if samples == 0 or self._counter <= samples: self._printer.report(self) if self._counter == samples: break + + # for need two fetches to report rate converted counter + # metrics. so the actual output samples will be less than + # the speicified number when using '-s' and '-T' option. + # '+1' can fix this issue. + self._counter += 1 timer.sleep() self.fetch() except SystemExit as code: