Red Hat Bugzilla – Bug 1293642
RFE: pmiostat -x dm does not display all dm devices.
Last modified: 2017-08-23 11:13:02 EDT
Description of problem: # iostat -tkx 1 1 | grep dm | wc -l 87 # pmiostat -x dm -s 2 | wc -l 60 pmiostat is missing 27 dm devices in its output. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Hi Bud, I'm not seeing this on my (smallish) systems. can you attach the full listings for both iostat and pmiostat, and also the output of : # for f in /sys/block/dm-*/dm/name; do echo $f $(cat $f); done # ls -l /dev/mapper # pminfo -f disk.dm.read hinv.map.dmname Thanks
Ah - just noticed iostat shows both sd and dm devices (as found in /proc/diskstats), whereas pmiostat displays *either* sd devices (default), or with -x dm shows only dm devices, omitting sd devices. With -x dm you're asking for dm stats, not sd stats. So I guess this would be an RFE for pmiostat -x dm to show both sd and dm devices in the one report. Is there a need for pmiostat to do that? Perhaps -x dm,sd ?
No, although an RFE to provide both is a good idea plus the inverse of iostat -N option to output the /dev/dm-N names instead of registered device mapper names. The problem is pmiostat is not outputting the all the devices that iostat shows. iostat -tkx 1 1 | grep sd | wc -l = 450 pmiostat -s 2 | grep sd | wc -l = 450 iostat -tkx 1 1 -p | grep dm | wc -l = 87 pmiostat -x dm -s 2 | grep -v "#" | wc -l = 59 oooooh crap. nevermind. close. There are some sdmX device that get swept up in the "grep dm" ... so if I use "dm-" instead I get the correct number of devices: iostat -tkx 1 1 -p | grep "dm-" | wc -l = 59 pmiostat -x dm -s 2 | grep -v "#" | wc -l = 59 mea culpa. go ahead and close as bad user on device.
ok cool. I'm going to keep this open as an RFE for -xdm,sd and also an option to report dm-X names instead of registered device names. The latter is just a reverse mapping of hinv.map.dmname, so it can (and should) be done at the client level rather than server-side in the Linux PMDA.
Updating BZ metadata as per comments #4 and #5.