Bug 1664871
| Summary: | When using base 'pcp dstat' command, time considered stat but should not be | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | John Pittman <jpittman> |
| Component: | pcp | Assignee: | Nathan Scott <nathans> |
| Status: | CLOSED DUPLICATE | QA Contact: | qe-baseos-tools-bugs |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.0 | CC: | fche, lberk, mgoodwin, nathans, nweddle, patrickm, tcleveng |
| Target Milestone: | rc | ||
| Target Release: | 8.1 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-05-15 21:48:13 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1682583, 1685302 | ||
| Bug Blocks: | |||
Hi John, I tend to agree. The current behaviour is compatible with the original dstat implementation, but I too find it a little odd and unhelpful so I'm inclined to change it. (if anyone can think of any reason it might be useful to report only time, please let me know) It's a straightforward change to the code too. One thing I did notice while updating the code was that prefixing the --time column to the existing default set of columns does push the length of the output past 80 characters wide. In dstat output to a console that results in the final column being chopped off (with a visible indicator that has happened) - only affects console output, not csv to-a-file mode. I expect that's not a major issue in practice however (a small increase in sizing to the terminal resolves it), and I'll make this change exactly as you've suggested unless anyone has a compelling case for using the --time option on its own. cheers. Thanks Nathan, sounds good. Please let me know if you need anything. This is fixed upstream via the PCP commit below. Will be in the pcp-4.3.1 release in a few weeks time, which will promptly make its way into Fedora and the RHEL8.x series thereafter. Thanks for the report John!
commit 14ff9283d79e46d10698afafa9ad83978ec55169
Author: Nathan Scott <nathans>
Date: Thu Jan 10 16:54:21 2019 +1100
pcp-dstat: improve solo --time option handling
Without any other options, --time is not useful - change it so
that the 'You did not choose any stats options' logic kicks in,
and it reports the -a set. Fixes a console-size handling issue
that is then exposed too.
This resolves Red Hat BZ #1664871.
This commit is included in the PCP rebase for 8.1. *** This bug has been marked as a duplicate of bug 1685302 *** |
Description of problem: When using base 'pcp dstat' command, time considered stat but should not be. For example if the below command is issued, only a column of timestamps is displayed. [root@localhost ~]# pcp dstat --time ----system---- time 09-01 16:27:52 09-01 16:27:53 09-01 16:27:54 09-01 16:27:55 09-01 16:27:56^C There is no use-case for this, so instead it should assume that the user just wanted to add timestamps to the default stats. Version-Release number of selected component (if applicable): pcp-zeroconf-4.2.0-1.el8.x86_64 Steps to reproduce: # pcp dstat --time Actual results: [root@localhost ~]# pcp dstat --time ----system---- time 09-01 16:27:52 09-01 16:27:53 09-01 16:27:54 09-01 16:27:55 09-01 16:27:56^C Expected results: [root@localhost ~]# pcp dstat --time You did not select any stats, using -cdngy by default. ----system---- ----total-usage---- -dsk/total- -net/total- ---paging-- ---system-- time |usr sys idl wai stl| read writ| recv send| in out | int csw 09-01 16:29:42| | | | | 09-01 16:29:43| 0 0 99 0 0| 0 0 | 118 102 | 0 0 | 192 1237 09-01 16:29:44| 0 0 100 0 0| 0 0 | 66 950 | 0 0 | 77 119 09-01 16:29:45| 0 0 100 0 0| 0 0 | 118 374 | 0 0 | 68 90 09-01 16:29:46| 0 0 100 0 0| 0 0 | 66 374 | 0 0 | 57 83 09-01 16:29:47| 0 0 99 0 0| 0 0 | 118 374 | 0 0 | 64 97 09-01 16:29:48| 0 0 100 0 0| 0 0 | 66 374 | 0 0 | 58 82 09-01 16:29:49| 0 0 100 0 0| 0 0 | 118 374 | 0 0 | 56 84 ^C