]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-checkconfig: Show namespace limits
authorStéphane Graber <stgraber@stgraber.org>
Tue, 2 Apr 2024 15:21:43 +0000 (11:21 -0400)
committerStéphane Graber <stgraber@stgraber.org>
Tue, 2 Apr 2024 15:25:29 +0000 (11:25 -0400)
Closes #4259

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
src/lxc/cmd/lxc-checkconfig.in

index 361d4d98c7b840dc99d36f7ac42be1d86caf8882..c77da4d3d3727c850ff46789fea4b7fe2f2674ed 100755 (executable)
@@ -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 ---"