查看操作日志
[root@tandelin logs]# cat /var/log/messages
Jan 27 08:09:25 tandelin dhclient[2460]: DHCPREQUEST on eth0 to 192.168.0.1 port 67 (xid=0x3f1af445)
Jan 27 08:09:25 tandelin dhclient[2460]: DHCPACK from 192.168.0.1 (xid=0x3f1af445)
Jan 27 08:09:25 tandelin NetworkManager[1384]: <info> (eth0): DHCPv4 state changed renew -> renew
Jan 27 08:09:25 tandelin NetworkManager[1384]: <info> address 192.168.0.213
Jan 27 08:09:25 tandelin NetworkManager[1384]: <info> prefix 16 (255.255.0.0)
Jan 27 08:09:25 tandelin NetworkManager[1384]: <info> gateway 192.168.0.1
Jan 27 08:09:25 tandelin NetworkManager[1384]: <info> hostname 'tandelin'
Jan 27 08:09:25 tandelin NetworkManager[1384]: <info> nameserver '192.168.0.1'
查看系统登陆日志
[root@tandelin logs]# vim /var/log/secure
Jan 28 17:24:36 tandelin sshd[7551]: pam_unix(sshd:session): session closed for user root
Jan 28 17:28:21 tandelin sshd[3404]: pam_unix(sshd:session): session closed for user root
Jan 28 17:28:21 tandelin su: pam_unix(su:session): session closed for user jhadmin
Jan 28 17:28:21 tandelin su: pam_unix(su:session): session closed for user root
Jan 28 17:28:21 tandelin su: pam_unix(su:session): session closed for user jhadmin
查看邮件日志
[root@tandelin logs]# vim /var/log/maillog
Jan 28 09:22:42 tandelin postfix/postfix-script[1924]: starting the Postfix mail system
Jan 28 09:22:43 tandelin postfix/master[1925]: daemon started -- version 2.6.6, configuration /etc/postfix
查看系统启动日志:/var/log/boot.log
日志信息提示为:
debug 表示有调式信息的,日志信息最多;
info 表示一般信息的日志,最常用;
notice表示最具有重要性的普通条件信息;
warning表示警告级别;
err表示错误级别,组织某个功能或者模块不能正常工作的信息;
crit 表示严重级别,组织整个系统或者整个软件不能正常工作的信息;
alert表示需要立刻修改的信息 ;
emerg 表示内核崩溃等严重信息;