summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAdrien Mahieux <adrien.mahieux@gmail.com>2019-09-18 14:13:32 +0200
committerChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-09-18 14:13:32 +0200
commit0942680f85a3fb0a03bc8c211fcc9d286572c242 (patch)
treef0d664bad2627e0bf488f970927be55c05c5b0d7 /CMakeLists.txt
parenta3a46cb6d5147a1e8159de468523cd91d08bc2cf (diff)
Collector slabinfo (#6800)
### Summary Provide new collector parsing `/proc/slabinfo` to provide details on kernel slab structures. Asked by issue #13 (very happy for the oldest issue in backlog) ##### Component Name collectors/slabinfo.plugin ##### Additional Information This slabinfo details allows to have clues on actions done on your system. In the following screenshot, you can clearly see a `find` done on a ext4 filesystem (the number of `ext4_inode_cache` & `dentry` are rising fast), and a few seconds later, an admin issued a `echo 3 > /proc/sys/vm/drop_cached` as their count dropped.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f2ec31698..75a5427a33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -400,6 +400,10 @@ set(PERF_PLUGIN_FILES
collectors/perf.plugin/perf_plugin.c
)
+set(SLABINFO_PLUGIN_FILES
+ collectors/slabinfo.plugin/slabinfo.c
+ )
+
set(PROC_PLUGIN_FILES
collectors/proc.plugin/ipc.c
collectors/proc.plugin/plugin_proc.c
@@ -728,6 +732,7 @@ IF(LINUX)
SET(ENABLE_PLUGIN_CGROUP_NETWORK True)
SET(ENABLE_PLUGIN_APPS True)
SET(ENABLE_PLUGIN_PERF True)
+ SET(ENABLE_PLUGIN_SLABINFO True)
ELSEIF(FREEBSD)
add_executable(netdata config.h ${NETDATA_FILES} ${FREEBSD_PLUGIN_FILES})
@@ -737,6 +742,7 @@ ELSEIF(FREEBSD)
SET(ENABLE_PLUGIN_CGROUP_NETWORK False)
SET(ENABLE_PLUGIN_APPS True)
SET(ENABLE_PLUGIN_PERF False)
+ SET(ENABLE_PLUGIN_SLABINFO False)
ELSEIF(MACOS)
add_executable(netdata config.h ${NETDATA_FILES} ${MACOS_PLUGIN_FILES})
@@ -746,6 +752,7 @@ ELSEIF(MACOS)
SET(ENABLE_PLUGIN_CGROUP_NETWORK False)
SET(ENABLE_PLUGIN_APPS False)
SET(ENABLE_PLUGIN_PERF False)
+ SET(ENABLE_PLUGIN_SLABINFO False)
ENDIF()
@@ -844,6 +851,20 @@ ENDIF()
# -----------------------------------------------------------------------------
+# slabinfo.plugin
+
+IF(ENABLE_PLUGIN_SLABINFO)
+ message(STATUS "slabinfo.plugin: enabled")
+ add_executable(slabinfo.plugin config.h ${SLABINFO_PLUGIN_FILES})
+ target_link_libraries (slabinfo.plugin libnetdata ${NETDATA_COMMON_LIBRARIES})
+ target_include_directories(slabinfo.plugin PUBLIC ${NETDATA_COMMON_INCLUDE_DIRS})
+ target_compile_options(slabinfo.plugin PUBLIC ${NETDATA_COMMON_CFLAGS})
+ELSE()
+ message(STATUS "slabinfo.plugin: disabled")
+ENDIF()
+
+
+# -----------------------------------------------------------------------------
# cgroup-network
IF(ENABLE_PLUGIN_CGROUP_NETWORK)