pmrep: add -X "label" flag for instance-per-line output mode
commit78a881152382bf37234d6fddd3e5f56677523841
authorMarko Myllynen <myllynen@redhat.com>
Wed, 9 Nov 2016 08:47:51 +0000 (9 19:47 +1100)
committerMark Goodwin <mgoodwin@redhat.com>
Wed, 9 Nov 2016 08:47:51 +0000 (9 19:47 +1100)
tree418422f422cdc3e1e9d2551f686acdbc5f50e379
parent40598e4a4f2ffad519f54f01d6fa90dc3ae03d0a
pmrep: add -X "label" flag for instance-per-line output mode

This adds the -X flag for instance-per-line mode. e.g.

$ pmrep -s3 -r -X network.interface.in.bytes network.interface.out.bytes
          n.i.i.bytes  n.i.o.bytes
                 byte         byte
lo              56168        56168
virbr0-n            0            0
virbr0          27350        16350
wlan0       127503211     16790503
tun0          3661355      1188515
lo              56168        56168
virbr0-n            0            0
virbr0          27350        16350
wlan0       127503211     16790503
tun0          3661355      1188515
lo              56168        56168
virbr0-n            0            0
virbr0          27350        16350
wlan0       127503211     16790503
tun0          3661355      1188515
$

Also allows easier grepping (if -i is not feasible) and emulating some
other utilities more closer, e.g., nicstat(1):

https://github.com/superjamie/pcp/commit/c6969807a7dfdf2bce6f3b1dff0ec1084bb947f1

Passes existing QA, new QA case added for this.

Caching results is needed, something like "pmrep -s1 -X proc" took
half a minute without caching, with caching around one second.

Author:    Marko Myllynen <myllynen@redhat.com>
qa/1069
qa/1069.out
src/bashrc/pcp_completion.sh
src/pmrep/TODO
src/pmrep/pmrep.1
src/pmrep/pmrep.conf
src/pmrep/pmrep.conf.5
src/pmrep/pmrep.py
src/zshrc/_pcp