pcp
pcp copied to clipboard
RFE: Provide device UUID as PCP metric values
Many distributions use device UUIDs e.g. in their fstab files and commands like blkid and lsblk -f print device UUIDs.
It looks like that PCP doesn't provide device UUIDs:
root@fedora-35:~# grep UUID /etc/fstab
UUID=46f8c492-611d-4788-8f20-b872eb2a52e1 /boot xfs defaults 0 0
root@fedora-35:~# pminfo -f | /bin/grep -i b872eb2a52e1
inst [5028 or "005028 /bin/grep"] value "/bin/grep -i b872eb2a52e1"
root@fedora-35:~#
It would be helpful if PCP would provide device UUIDs as metric values.
I think we'd need a new libblkid PMDA for this. From memory this is all done by block device probing and heuristics (i.e. file(1) for devices) and not via any stable kernel API.
I wanted to work with this issue please can you assign this issue this to me !
Seems like the info is stashed in /dev/disk/by-uuid so we may be able to avoid libblkid and a new PMDA. Not sure how far back in time this directory exists, but it is present in Ubuntu 22.04. @555vedant please let us know a little of your PCP experience and C coding expertise ... this change needs to be made in the heart of a big and complicated part of PCP.
by-uuid exists for at least 10 years as I recall.
G'day Jeff aka @jhansonhpe. Thanks for that, so /dev/disk/by-uuid is (a) available everywhere in Linux land we care about, and (b) appeared about 19 years after PCP 1.0 😄
@myllynen is this what you're looking for?
kenj@bozo:~$ pminfo -h bozo-vm -f filesys.uuid
filesys.uuid
inst [0 or "/dev/sda3"] value "9a619cdf-d854-472d-921d-dcadb59aab7f"
inst [1 or "/dev/sda2"] value "5F0A-6A3A"
inst [2 or "/dev/sdb1"] value "d049bc79-b90d-4f04-a5fd-e3b10919c790"
inst [3 or "/dev/sdd1"] value "aae156cf-f77d-4c80-8f53-b0650519409d"
inst [4 or "/dev/sdc1"] value "97bde1e0-07af-410f-8496-078885f9b173"
Yes, that looks good, thanks!