Skip to content

Commit 8af3517

Browse files
committed
tweak monitoring
1 parent b243ec6 commit 8af3517

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

cloud/blockstore/libs/storage/disk_agent/disk_agent_actor_monitoring.cpp

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "disk_agent_actor.h"
22

3+
#include <cloud/blockstore/libs/nvme/nvme.h>
34
#include <cloud/blockstore/libs/rdma/iface/server.h>
45
#include <cloud/blockstore/libs/storage/disk_common/monitoring_utils.h>
56

@@ -92,6 +93,7 @@ void TDiskAgentActor::RenderNVMeDevices(IOutputStream& out) const
9293
TABLEH() { out << "Capacity"; }
9394
TABLEH() { out << "PCI"; }
9495
TABLEH() { out << "IOMMU group"; }
96+
TABLEH() { out << "Current driver"; }
9597
}
9698

9799
for (const auto& d: devices) {
@@ -103,15 +105,30 @@ void TDiskAgentActor::RenderNVMeDevices(IOutputStream& out) const
103105
<< d.GetCapacity() << " B)";
104106
}
105107
TABLED () {
106-
out << "(" << Hex(d.GetPCIVendorId()) << " "
107-
<< Hex(d.GetPCIDeviceId()) << ") "
108-
<< d.GetPCIAddress();
108+
out << "(" << Hex(d.GetPCIVendorId(), HF_ADDX)
109+
<< " " << Hex(d.GetPCIDeviceId(), HF_ADDX)
110+
<< ") " << d.GetPCIAddress();
109111
}
110112
TABLED () {
111113
if (d.HasIOMMUGroup()) {
112114
out << d.GetIOMMUGroup();
113115
}
114116
}
117+
TABLED () {
118+
auto [name, error] = NvmeManager->GetDriverName({
119+
.VendorId = static_cast<ui16>(d.GetPCIVendorId()),
120+
.DeviceId = static_cast<ui16>(d.GetPCIDeviceId()),
121+
.Address = d.GetPCIAddress(),
122+
});
123+
if (HasError(error)) {
124+
DIV () {
125+
out << "Can't get a driver name: "
126+
<< FormatError(error);
127+
}
128+
} else {
129+
out << name;
130+
}
131+
}
115132
}
116133
}
117134
}

0 commit comments

Comments
 (0)