怎样查看linux系统的重启日志的路径?
发布网友
发布时间:2022-04-19 14:54
我来回答
共4个回答
热心网友
时间:2022-05-03 21:25
1、首先,连接相应linux主机,进入到linux命令行状态下,等待输入shell指令。
2、在linux命令行下输入shell指令:last -f /var/log/wtmp。
3、键盘按“回车键”运行shell指令,此时会看到系统的开启、关闭、重启日志。
热心网友
时间:2022-05-03 22:43
Linux系统下系统重启操作的日志信息,都是/var/log/messages目录下下保存着,查看方法如下:
[root@localhost ~]#cat /var/log/messages |more
Dec 20 02:46:56 localhost xinetd[5248]: EXIT: telnet status=1 pid=12350 ration
=30(sec)
Dec 22 19:59:12 localhost shutdown[32014]: shutting down for system halt
Dec 22 19:59:12 localhost pcscd: winscard.c:304:SCardConnect() Reader E-Gate 0 0
Not Found
Dec 22 19:59:13 localhost smartd[5472]: smartd received signal 15: Terminated
Dec 22 19:59:13 localhost smartd[5472]: smartd is exiting (exit status 0)
Dec 22 19:59:14 localhost avahi-daemon[5410]: Got SIGTERM, quitting.
Dec 22 19:59:14 localhost avahi-daemon[5410]: Leaving mDNS multicast group on in
terface usb0.IPv6 with address fe80::21:5eff:fe9c:b6d7.
Dec 22 19:59:14 localhost avahi-daemon[5410]: Leaving mDNS multicast group on in
terface eth0.IPv6 with address fe80::221:5eff:fe98:b6f4.
Dec 22 19:59:14 localhost avahi-daemon[5410]: Leaving mDNS multicast group on in
terface eth0.IPv4 with address 10.132.0.162.
Dec 22 20:21:08 localhost syslogd 1.4.1: restart.
Dec 22 20:21:08 localhost kernel: klogd 1.4.1, log source = /proc/kmsg started.
Dec 22 20:21:08 localhost kernel: Linux version 2.6.18-1.el5 (mockbuild@x86-00
3.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP T
ue Aug 18 15:51:48 EDT 2009
如果是只是查看Linux系统最近重启日志中的时间,方法如下:
[root@localhost ~]# last reboot
reboot system boot 2.6.18-1.el5 Wed Dec 22 20:19 (12:58)
reboot system boot 2.6.18-1.el5 Wed Nov 10 10:41 (42+09:17)
reboot system boot 2.6.18-1.el5 Tue Oct 26 19:49 (14+14:42)
reboot system boot 2.6.18-1.el5 Fri Oct 22 00:22 (4+19:21)
reboot system boot 2.6.18-1.el5 Thu Oct 21 03:47 (5+15:56)
reboot system boot 2.6.18-1.el5 Wed Oct 20 23:43 (5+20:00)
reboot system boot 2.6.18-1.el5 Sat Sep 18 20:31 (37+23:12)
热心网友
时间:2022-05-04 00:18
/var/log/demsg
热心网友
时间:2022-05-04 02:09
ls -all