linux日誌

系統核心日誌ide

[root@wy ~]# ls /var/log/messagesspa

說明:它有自動切割、自動歸檔的功能。日誌


查看日誌切割配置文件進程

[root@wy ~]# cat /etc/logrotate.confit

weekly    每週切割一次ast

rotate 4  切割後保留四個文件class

create   建立一個新的登錄

dateext 以日期形式命名配置

compress  把日誌文件壓縮date


用戶登陸歷史日誌

[root@wy ~]# ls /var/log/wtmp


查看登陸歷史

[root@wy ~]# last


無效、失敗登陸歷史日誌

[root@wy ~]# ls /var/log/btmp


查看無效登陸歷史

[root@wy ~]# lastb


郵件日誌

[root@wy ~]# ls /var/log/maillog


驗證相關(正常或失敗的登陸會記錄)

[root@wy ~]# ls /var/log/secure


系統啓動的過程當中一些硬件相關的日誌

[root@wy ~]# ls /var/log/dmesg


dmesg查看一些實時、更新的(有助於去得到硬件錯誤信息,與/var/log/dmesg不同)

[root@wy ~]# dmesg


kill

kill是跟系統信號相關的

kill PID    殺死進程

kill -9 PID  強制殺死進程

killall +進程名

相關文章
相關標籤/搜索