diff --git a/README.md b/README.md
index 0b375e0..83937f2 100644
--- a/README.md
+++ b/README.md
@@ -898,6 +898,17 @@ _**Example** (require at least 1 GB free)_: `check_hw_swap_free 1048576`
+##### check_hw_slab_unreclaimable
+`check_hw_slab_unreclaimable max_kb`
+
+`check_hw_slab_unreclaimable` compares the amount of slab unreclaimable memory to the maximum provided (in kB). If the slab unreclaimable is greater than _max_kb_ kilobytes, the check fails.
+
+_**Example** (require less than 5 GB unreclaimable)_: `check_hw_slab_unreclaimable 5242880`
+
+
+
+
+
##### check_moab_sched
`check_moab_sched [-t timeout] [-a alert_match] [-m [!]mstr] [-v version_match]`
diff --git a/scripts/lbnl_hw.nhc b/scripts/lbnl_hw.nhc
index ddc6f82..a99e24c 100644
--- a/scripts/lbnl_hw.nhc
+++ b/scripts/lbnl_hw.nhc
@@ -11,6 +11,7 @@ HW_RAM_TOTAL=0
HW_RAM_FREE=0
HW_SWAP_TOTAL=0
HW_SWAP_FREE=0
+HW_SLAB_UNRECLAIMABLE=0
HW_IB_STATE=( )
HW_IB_PHYS_STATE=()
HW_IB_RATE=( )
@@ -81,6 +82,8 @@ function nhc_hw_gather_data() {
HW_SWAP_TOTAL=${FIELD[1]}
elif [[ "${FIELD[0]}" = "SwapFree:" ]]; then
HW_SWAP_FREE=${FIELD[1]}
+ elif [[ "${FIELD[0]}" = "SUnreclaim:" ]]; then
+ HW_SLAB_UNRECLAIMABLE=${FIELD[1]}
fi
done < /proc/meminfo
else
@@ -328,6 +331,23 @@ function check_hw_mem_free() {
return 0
}
+# Check amount of Slab unreclaimable against maximum ($1).
+function check_hw_slab_unreclaimable() {
+ local MAXUNRECLAIMABLE=$1
+
+ if [[ $HW_RAM_TOTAL -eq 0 ]]; then
+ nhc_hw_gather_data
+ fi
+
+ nhc_common_parse_size "$MAXUNRECLAIMABLE" MAXUNRECLAIMABLE
+
+ if [[ $HW_SLAB_UNRECLAIMABLE -gt $MAXUNRECLAIMABLE ]]; then
+ die 1 "$FUNCNAME: Slab unreclaimable is too large ($HW_SLAB_UNRECLAIMABLE kB > $MAXUNRECLAIMABLE kB)."
+ return 1
+ fi
+ return 0
+}
+
# Check if IB state, phys_state, and rate ($1) all match.
function check_hw_ib() {
local STATE="ACTIVE"