pcp icon indicating copy to clipboard operation
pcp copied to clipboard

pcp-ps seems to botch command arg parsing and -o does nothing

Open kmcdonell opened this issue 2 years ago • 3 comments

This is wrong on several levels ...

kenj@bozo-vm:~$ pcp-ps -e -o '%cpu' TypeError: ProcessStatOptions.extraOptions() takes 3 positional arguments but 4 were given TypeError: ProcessStatOptions.extraOptions() takes 3 positional arguments but 4 were given Linux 5.15.0-52-generic (bozo-vm) 11/04/22 x86_64 (4 CPU) Timestamp PID TIME CMD 21:07:34 1 00:00:05 systemd
21:07:34 2 00:00:00 kthreadd
21:07:34 3 00:00:00 rcu_gp
21:07:34 4 00:00:00 rcu_par_gp
21:07:34 5 00:00:00 netns
21:07:34 7 00:00:00 kworker/0:0H-events_ ...

  1. TypeError => command line arg parsing is broken
  2. output is not connected to -o options (related to 1.?) ... output is always the same irrespective of command line options!
  3. Timestamp field is not even mentioned in the man page

kmcdonell avatar Nov 04 '22 10:11 kmcdonell

#1709 Merge request 1709 will fix this issue

orasagar avatar Nov 07 '22 09:11 orasagar

@orasagar Thanks for the fix. Unfortunately, this does not seem to resolve all of the issues.

  1. is fixed
  2. remains ... it does not seem to matter what the -o options are, the output remains the same.
  3. remains

kmcdonell avatar Dec 28 '22 08:12 kmcdonell

@kmcdonell

2 -o option needs to be used exclusive of any other option .please check the qa/1987 last third test case for it and it has a respective output for that also in 1987.out file . if you want I will mention the same thing in the man page also so that it will not confuse. 3- will be fixed along with other documentation bugs.

orasagar avatar Jan 04 '23 10:01 orasagar