Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
dstat -dam not working
Version-Release number of selected component (if applicable):
How reproducible:
pcp-dstat 4.3.0
Written by the PCP team <pcp> and Dag Wieers <dag>
Homepages at https://pcp.io/ and http://dag.wieers.com/home-made/dstat/
Platform Linux
Kernel 4.18.0-80.el8.x86_64
Python 3.6.8 (default, Apr 3 2019, 17:26:03)
[GCC 8.2.1 20180905 (Red Hat 8.2.1-3)]
Steps to Reproduce:
1. Run command dstat -dam
Actual results:
Traceback (most recent call last):
File "/usr/bin/dstat", line 1632, in <module>
dstat.execute()
File "/usr/bin/dstat", line 1616, in execute
scheduler.run()
File "/usr/lib64/python3.6/sched.py", line 154, in run
action(*argument, **kwargs)
File "/usr/bin/dstat", line 1625, in perform
op.perform(update)
File "/usr/bin/dstat", line 1509, in perform
line = line + sep + self.gshow(plugin, results)
File "/usr/bin/dstat", line 1148, in gshow
metric = op.metrics[plugin.mgroup[0]]
IndexError: list index out of range
Expected results:
No Error
Additional info:
Hi there,
I think this may be because -d and -a have overlapping functionality - does it work correctly if you use 'dstat -am'?
We can certainly improve the tool by simply ignoring any duplicate column (-d) requests, which should resolve the issue.
cheers.
(In reply to LiliDeng from comment #2)
> Thanks for your reply, 'dstat -am' works,
No problem - thanks for conforming.
> if -d and -a can't use at the same
> time, it is better to meaning hints not throw an exception.
Yes, definitely. I'll fix that up.
cheers.
Fixed upstream, will be merged into RHEL-8 with next PCP rebase.
commit e7ad59af398d191cf49e0df15a8dc49a9a4b53db
Author: Nathan Scott <nathans>
Date: Mon Jun 3 08:00:16 2019 +1000
pcp-dstat: ensure duplicate columns collapse to just one
If the user directly or indirectly (eg via -a) requests
the same column multiple times, collapse this to one so
that the screen real estate is conserved. Old versions
of pcp-dstat would also throw a stack trace here.
Update qa/1187 with new test cases exercising this.
Resolves Red Hat BZ #1715408