summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJos Dehaes <jos.dehaes@gmail.com>2021-10-09 21:44:16 +0200
committerJos Dehaes <jos.dehaes@gmail.com>2021-10-09 21:44:16 +0200
commit8fad5a61bee973c22f3a11fd7fee2c4e40390bbb (patch)
treeff06e838c8975ea4da11660eead5c88bbc168c30
parent7fa903cf160b391fb316ea32a60984921a174066 (diff)
get more disk IO stats
-rw-r--r--src/osx/btop_collect.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osx/btop_collect.cpp b/src/osx/btop_collect.cpp
index 0db60e0..7460fb9 100644
--- a/src/osx/btop_collect.cpp
+++ b/src/osx/btop_collect.cpp
@@ -536,7 +536,11 @@ namespace Mem {
IORegistryEntryGetParentEntry(drive, kIOServicePlane, &volumeRef);
if (volumeRef) {
if (!isWhole(volumeRef)) {
+ string bsdName = getCFString(volumeRef, CFSTR("BSD Name"));
string device = getCFString(volumeRef, CFSTR("VolGroupMntFromName"));
+ if (!mapping.contains(device)) {
+ device = "/dev/" + bsdName; // try again with BSD name - not all volumes seem to have VolGroupMntFromName property
+ }
if (device != "") {
if (mapping.contains(device)) {
string mountpoint = mapping.at(device);