TMAegis
tdsql için daha fazla kural

TMA-TDSQL-1.9

Ensure Appropriate System Resource Limits Are Configured

OrtaDüzey 1Otomatiktdsql

Açıklama

Operating system resource limits (ulimits) should be properly configured for TDSQL processes, particularly the number of open file descriptors, maximum processes, and memory locking. Passes when /etc/security/limits.conf or limits.d sets hard nofile and nproc limits of at least 65535 for the tdsql user (the benchmark baseline). For systemd-managed components also confirm LimitNOFILE/LimitNPROC in the unit.

Nasıl denetlenir

Denetim yöntemi: Kabuk komutu

shell
out=$(cat /etc/security/limits.conf /etc/security/limits.d/*.conf 2>/dev/null) || exit 1; printf '%s\n' "$out" | awk '$1 == "tdsql" && $2 == "hard" && $3 == "nofile" && ($4 == "unlimited" || $4 + 0 >= 65535) {f++} $1 == "tdsql" && $2 == "hard" && $3 == "nproc" && ($4 == "unlimited" || $4 + 0 >= 65535) {p++} END {print (f && p) ? "compliant" : "noncompliant"}'
Beklenen çıktı
compliant

Nasıl düzeltilir

Düzeltme yöntemi: Kılavuz veya altyapı yaması

Add to /etc/security/limits.conf: tdsql soft nofile 65535; tdsql hard nofile 65535; tdsql soft nproc 65535; tdsql hard nproc 65535; tdsql soft memlock unlimited; tdsql hard memlock unlimited; then restart the components.

Özellikler

İşletim sistemleri
Herhangi biri
Etiketler
tdsqlos
Referans
CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 1.9 Ensure Appropriate System Resource Limits Are Configured

Bu ana makineyi denetle

Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.

shell
tmaegis scan --target tdsql