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>