故障描述:
云主機(jī)無(wú)法ssh及ping通,端口開啟。VNC中有大量“backlog limit exceeded”的提示
audit:backlog limit exceeded
audit:audit_backlog=321 > audit_backlog_limit=320
處理過(guò)程:
根具提示“audit_backlog=321 > audit_backlog_limit=320”,本問(wèn)題鎖定在,audit服務(wù)在繁忙的系統(tǒng)中進(jìn)行審計(jì)事件操作,緩沖瓶頸!
# less/var/log/audit/audit.log
Dec 15 03:24:46 saslauthd[5892]: do_auth ??????? : auth failure: [user=test@cto.com] [service=smtp] [realm=cto.com] [mech=pam] [reason=PAM autherror]
Dec 15 03:25:15 saslauthd[5890]: do_auth ??????? : auth failure: [user=test@cto.com] [service=smtp] [realm=cto.com] [mech=pam] [reason=PAM autherror]
Dec 15 03:25:45 saslauthd[5889]: do_auth ??????? : auth failure: [user=test@cto.com] [service=smtp] [realm=cto.com] [mech=pam] [reason=PAM autherror]
# dmesg |grep -i error
i8042: probe of i8042 failed with error -5
結(jié)論:
Linux 2.6內(nèi)核有用日志記錄事件的能力,比如記錄系統(tǒng)調(diào)用和文件訪問(wèn)。然后,管理員可以評(píng)審這些日志,確定可能存在的安全裂口,比如失敗的登錄嘗試,或者 用戶對(duì)系統(tǒng)文件不成功的訪問(wèn)。這種功能稱為L(zhǎng)inux審計(jì)系統(tǒng)。Redhat 5.x版本中已經(jīng)可用。配置文件/etc/audit/auditd.conf 記錄了日志位置、磁盤空間等配置信息,當(dāng)出現(xiàn)問(wèn)題,優(yōu)先排查配置參數(shù)是否存在性能瓶頸!然后在通過(guò)排查安全情況。
規(guī)避方法:
修改audit緩沖區(qū)大小參數(shù),默認(rèn)為64:
[root@ www.ctohome.com]# auditctl -b 8192
AUDIT_STATUS: enabled=1 flag=1 pid=6118 rate_limit=0 backlog_limit=8192 lost=0 backlog=1
其他:
啟動(dòng)audit:
檢查進(jìn)程:# ps -ef | grep audit*
啟動(dòng)audit:#?auditd
開啟關(guān)閉
Enable/disable:# auditctl -e 0/1