Bug 1293642

Summary: RFE: pmiostat -x dm does not display all dm devices.
Product: [Fedora] Fedora Reporter: Dwight (Bud) Brown <bubrown>
Component: pcpAssignee: Mark Goodwin <mgoodwin>
Status: CLOSED NOTABUG QA Contact: qe-baseos-tools-bugs
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: fche, lberk, mbenitez, mgoodwin, nathans, pcp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-05 04:48:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dwight (Bud) Brown 2015-12-22 14:19:19 UTC
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:

Comment 2 Mark Goodwin 2015-12-23 00:19:10 UTC
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

Comment 3 Mark Goodwin 2015-12-23 01:03:10 UTC
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 ?

Comment 4 Dwight (Bud) Brown 2015-12-23 16:06:33 UTC
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.

Comment 5 Mark Goodwin 2015-12-23 20:48:36 UTC
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.

Comment 6 Nathan Scott 2016-01-07 23:59:18 UTC
Updating BZ metadata as per comments #4 and #5.

Comment 7 Mark Goodwin 2019-03-05 04:48:26 UTC
Closing as per Comment #4