From 0f18db54328f9e5a54d303937f84aad017d16cdf Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= Date: Tue, 2 Apr 2024 11:21:43 -0400 Subject: [PATCH] lxc-checkconfig: Show namespace limits MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Closes #4259 Signed-off-by: Stéphane Graber --- src/lxc/cmd/lxc-checkconfig.in | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ---" -- 2.47.3