From: Stéphane Graber Date: Tue, 2 Apr 2024 15:21:43 +0000 (-0400) Subject: lxc-checkconfig: Show namespace limits X-Git-Tag: v6.0.0~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f18db54328f9e5a54d303937f84aad017d16cdf;p=thirdparty%2Flxc.git lxc-checkconfig: Show namespace limits Closes #4259 Signed-off-by: Stéphane Graber --- diff --git a/src/lxc/cmd/lxc-checkconfig.in b/src/lxc/cmd/lxc-checkconfig.in index 361d4d98c..c77da4d3d 100755 --- a/src/lxc/cmd/lxc-checkconfig.in +++ b/src/lxc/cmd/lxc-checkconfig.in @@ -160,6 +160,14 @@ if [ $KVER_MAJOR -lt 4 ] || { [ $KVER_MAJOR -eq 4 ] && [ $KVER_MINOR -lt 7 ]; }; printf "Multiple /dev/pts instances: " && is_enabled DEVPTS_MULTIPLE_INSTANCES echo fi +echo "Namespace limits:" +for file in /proc/sys/user/max_*_namespaces; do + [ -r "${file}" ] || continue + + ns_name="$(basename "${file}" | sed -e "s/^max_//g" -e "s/_namespaces$//g")" + printf " %s: %s" "${ns_name}" "$(cat "${file}")" + echo +done echo " --- Control groups ---"