日志linux
syslog日志系統(tǒng):
? syslogd 系統(tǒng),非內(nèi)核產(chǎn)生的信息? man? 2 syslog?
? klogd? ? 內(nèi)核,專門負(fù)責(zé)內(nèi)核產(chǎn)生的信息?man? 3 syslog?
?/var/log/messages? 系統(tǒng)標(biāo)準(zhǔn)錯(cuò)誤日志信息,非內(nèi)核? ?syslogd
?/var/log/dmesg? ?klogd?
共同配置文件etc/sysconfig/syslog
cron? -l
cron? -e? ? 時(shí) 分 日 月 周? ?。。。。。
crond? ?周期性的執(zhí)行??
用戶的crontab? -u 用戶?-e? ? ? ?/var/spool/cron/
系統(tǒng)的配置文件? ?/etc/cron.? ??/etc/crontab? ?每小時(shí),每周,每月,每天
安裝sysstat 包? ? 用sar命監(jiān)視系統(tǒng)狀態(tài)? /etc/cron.d/sa-update
anacrond? ?重新做計(jì)劃任務(wù)
?
?
dump? ?備份工具? ?可以識(shí)別分區(qū)? dump? -3uf? ?/tmp.dump.dump /dev/sda1??
logger "dd"調(diào)用syslog寫日志
日志滾動(dòng)logrotate
? ? ? ?/etc/syslog.conf? ?
? ? ?facility? ?可以理解為日志的來(lái)源或設(shè)備的
? ? ?auth? ? 認(rèn)證相關(guān)的? ? authpriv? ?權(quán)限,授權(quán)相關(guān)? ? ? ?cron? 任務(wù)計(jì)劃相關(guān)的
? ? daemon? 守護(hù)進(jìn)程相關(guān)的? ?kern? 內(nèi)核相關(guān)的? ?lpr? 打印相關(guān)的
? ? mail? ?郵件相關(guān)的? ?mark? ?標(biāo)記相關(guān)的? ?news? 新聞相關(guān)的
? ? security? 安全相關(guān)的? ? ?syslog? syslog相關(guān)的? ?user? 用戶相關(guān)的
? ?uucp? ?unix to unix? cp相關(guān)? ? ? local10到local17? 用戶自定義組
? ? *? ?表示所有
日志級(jí)別? ?
debug? ?調(diào)試? ? info? ?一般信息? ?notice? 不影響正常功能,需要提醒用戶的重要事件
waring/warn? 不影響正常功能,需要提醒用戶的重要事件不影響? ?error 錯(cuò)誤信息
crit? 比較嚴(yán)重的? ?alert? 必須馬上處理的? ?emerg/oanic? ?會(huì)導(dǎo)致系統(tǒng)不可用的
*? 表示所有的日志級(jí)別? ?none? ?跟*相反 表示啥也沒(méi)有
action日志記錄的位置
系統(tǒng)上的絕對(duì)路徑? ?普通文件
|? 管道? ? ?
終端? dev/console? ? ? @host? 遠(yuǎn)程主機(jī)? ? ? 用戶? ?系統(tǒng)用戶? ?
*? 登錄系統(tǒng)的所有用戶? 一般emerg 級(jí)別的日志是這樣定義的
總結(jié)
- 上一篇: MySQL 服务器调优
- 下一篇: linux 其他常用命令