mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zpcimon: Add NVMe SMART data monitor
Add a new monitor which uses libnvme to collect SMART data from NVMes. This monitor only implements the .collect_adapter_data operation since it carries no state across data collections. Nevertheless for future symmetry and possible future expansion also add an empty struct nvmemon_ctx. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
a9dbb8a1a2
commit
2eceedeb11
+21
-1
@@ -29,6 +29,16 @@ check_dep_libnl3:
|
||||
BUILDTARGET += check_dep_libnl3
|
||||
endif # HAVE_LIBNL3
|
||||
|
||||
ifneq (${HAVE_LIBNVME},0)
|
||||
check_dep_libnvme:
|
||||
$(call check_dep, \
|
||||
"zpcimon", \
|
||||
"libnvme.h", \
|
||||
"libnvme-devel", \
|
||||
"HAVE_LIBNVME=0")
|
||||
BUILDTARGET += check_dep_libnvme
|
||||
endif # HAVE_LIBNVME
|
||||
|
||||
ifeq (${HAVE_OPENSSL},0)
|
||||
|
||||
all:
|
||||
@@ -44,6 +54,13 @@ all:
|
||||
install:
|
||||
$(SKIP) HAVE_LIBNL3=0
|
||||
|
||||
else ifeq (${HAVE_LIBNVME},0)
|
||||
all:
|
||||
$(SKIP) HAVE_LIBNVME=0
|
||||
|
||||
install:
|
||||
$(SKIP) HAVE_LIBNVME=0
|
||||
|
||||
else
|
||||
|
||||
ifneq ($(shell sh -c 'command -v pkg-config'),)
|
||||
@@ -58,12 +75,15 @@ LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libnl-genl-3.0)
|
||||
LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libnl-route-3.0)
|
||||
|
||||
LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libcrypto)
|
||||
LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libnvme)
|
||||
else
|
||||
LIB_CFLAGS += -I /usr/include/libnl3/
|
||||
LIB_LFLAGS += -lnl-route-3 -lnl-genl-3 -lnl-3
|
||||
|
||||
LIB_CFLAGS += -I /usr/include/openssl/
|
||||
LIB_LFLAGS += -lcrypto
|
||||
|
||||
LIB_LFLAGS += -lnvme
|
||||
endif
|
||||
|
||||
ALL_CPPFLAGS += $(LIB_CFLAGS)
|
||||
@@ -73,7 +93,7 @@ BUILDTARGET += zpcimon
|
||||
|
||||
all: ${BUILDTARGET}
|
||||
|
||||
zpcimon: zpcimon.o opticsmon.o optics_info.o optics_sclp.o ethtool.o link_mon.o $(libs)
|
||||
zpcimon: zpcimon.o nvmemon.o opticsmon.o optics_info.o optics_sclp.o ethtool.o link_mon.o $(libs)
|
||||
|
||||
install: all
|
||||
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man8
|
||||
|
||||
Reference in New Issue
Block a user