RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1664871 - When using base 'pcp dstat' command, time considered stat but should not be
Summary: When using base 'pcp dstat' command, time considered stat but should not be
Keywords:
Status: CLOSED DUPLICATE of bug 1685302
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcp
Version: 8.0
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: 8.1
Assignee: Nathan Scott
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On: 1682583 1685302
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-09 21:31 UTC by John Pittman
Modified: 2021-09-17 12:44 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-15 21:48:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 3796461 0 None None None 2019-01-09 21:42:21 UTC
Red Hat Knowledge Base (Solution) 3796461 0 Troubleshoot None Why does pcp dstat --time show only timestamps 2019-05-28 11:59:42 UTC

Description John Pittman 2019-01-09 21:31:56 UTC
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

Comment 1 Nathan Scott 2019-01-10 02:43:50 UTC
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.

Comment 2 John Pittman 2019-01-10 13:01:54 UTC
Thanks Nathan, sounds good.  Please let me know if you need anything.

Comment 3 Nathan Scott 2019-01-11 00:03:40 UTC
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.

Comment 4 Nathan Scott 2019-05-15 21:48:13 UTC
This commit is included in the PCP rebase for 8.1.

*** This bug has been marked as a duplicate of bug 1685302 ***


Note You need to log in before you can comment on or make changes to this bug.