Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Change the blank length of pmiostat's output #87

Closed
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+8 −3
Split
@@ -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"
View
@@ -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: