之前centos7中是有这个日志的,/var/log/demesg
8以后(笔者是rocky8)是用journalctl -xb来排查启动日志错误(这个跟dmesg命令的输出并不是一回事,)
过滤错误示例
journalctl -xb|grep -i failed #其中grep -i是指不指定过滤字符的大小写,例如下面的就会过滤出来Failed而不只是小写的
1 [root@rocky102 ~]# journalctl -xb|grep -i failed 2 1月 18 10:01:27 maym kernel: pci 0000:00:15.3: BAR 13: failed to assign [io size 0x1000] 3 1月 18 10:01:27 maym kernel: pci 0000:00:15.4: BAR 13: failed to assign [io size 0x1000] 4 1月 18 10:01:27 maym kernel: pci 0000:00:15.5: BAR 13: failed to assign [io size 0x1000] 5 1月 18 10:01:27 maym kernel: pci 0000:00:15.6: BAR 13: failed to assign [io size 0x1000] 6 1月 18 10:01:27 maym kernel: pci 0000:00:15.7: BAR 13: failed to assign [io size 0x1000] 7 1月 18 10:01:27 maym kernel: pci 0000:00:16.3: BAR 13: failed to assign [io size 0x1000] 8 1月 18 10:01:27 maym kernel: pci 0000:00:16.4: BAR 13: failed to assign [io size 0x1000] 9 1月 18 10:01:27 maym kernel: pci 0000:00:16.5: BAR 13: failed to assign [io size 0x1000] 10 1月 18 10:01:27 maym kernel: pci 0000:00:16.6: BAR 13: failed to assign [io size 0x1000] 11 1月 18 10:01:27 maym kernel: pci 0000:00:16.7: BAR 13: failed to assign [io size 0x1000] 12 1月 18 10:01:27 maym kernel: pci 0000:00:17.3: BAR 13: failed to assign [io size 0x1000] 13 1月 18 10:01:27 maym kernel: pci 0000:00:17.4: BAR 13: failed to assign [io size 0x1000] 14 1月 18 10:01:27 maym kernel: pci 0000:00:17.5: BAR 13: failed to assign [io size 0x1000] 15 1月 18 10:01:27 maym kernel: pci 0000:00:17.6: BAR 13: failed to assign [io size 0x1000] 16 1月 18 10:01:27 maym kernel: pci 0000:00:17.7: BAR 13: failed to assign [io size 0x1000] 17 1月 18 10:01:27 maym kernel: pci 0000:00:18.2: BAR 13: failed to assign [io size 0x1000] 18 1月 18 10:01:27 maym kernel: pci 0000:00:18.3: BAR 13: failed to assign [io size 0x1000] 19 1月 18 10:01:27 maym kernel: pci 0000:00:18.4: BAR 13: failed to assign [io size 0x1000] 20 1月 18 10:01:27 maym kernel: pci 0000:00:18.5: BAR 13: failed to assign [io size 0x1000] 21 1月 18 10:01:27 maym kernel: pci 0000:00:18.6: BAR 13: failed to assign [io size 0x1000] 22 1月 18 10:01:27 maym kernel: pci 0000:00:18.7: BAR 13: failed to assign [io size 0x1000] 23 1月 18 10:01:27 maym kernel: pci 0000:00:18.7: BAR 13: failed to assign [io size 0x1000] 24 1月 18 10:01:27 maym kernel: pci 0000:00:18.6: BAR 13: failed to assign [io size 0x1000] 25 1月 18 10:01:27 maym kernel: pci 0000:00:18.5: BAR 13: failed to assign [io size 0x1000] 26 1月 18 10:01:27 maym kernel: pci 0000:00:18.4: BAR 13: failed to assign [io size 0x1000] 27 1月 18 10:01:27 maym kernel: pci 0000:00:18.3: BAR 13: failed to assign [io size 0x1000] 28 1月 18 10:01:27 maym kernel: pci 0000:00:18.2: BAR 13: failed to assign [io size 0x1000] 29 1月 18 10:01:27 maym kernel: pci 0000:00:17.7: BAR 13: failed to assign [io size 0x1000] 30 1月 18 10:01:27 maym kernel: pci 0000:00:17.6: BAR 13: failed to assign [io size 0x1000] 31 1月 18 10:01:27 maym kernel: pci 0000:00:17.5: BAR 13: failed to assign [io size 0x1000] 32 1月 18 10:01:27 maym kernel: pci 0000:00:17.4: BAR 13: failed to assign [io size 0x1000] 33 1月 18 10:01:27 maym kernel: pci 0000:00:17.3: BAR 13: failed to assign [io size 0x1000] 34 1月 18 10:01:27 maym kernel: pci 0000:00:16.7: BAR 13: failed to assign [io size 0x1000] 35 1月 18 10:01:27 maym kernel: pci 0000:00:16.6: BAR 13: failed to assign [io size 0x1000] 36 1月 18 10:01:27 maym kernel: pci 0000:00:16.5: BAR 13: failed to assign [io size 0x1000] 37 1月 18 10:01:27 maym kernel: pci 0000:00:16.4: BAR 13: failed to assign [io size 0x1000] 38 1月 18 10:01:27 maym kernel: pci 0000:00:16.3: BAR 13: failed to assign [io size 0x1000] 39 1月 18 10:01:27 maym kernel: pci 0000:00:15.7: BAR 13: failed to assign [io size 0x1000] 40 1月 18 10:01:27 maym kernel: pci 0000:00:15.6: BAR 13: failed to assign [io size 0x1000] 41 1月 18 10:01:27 maym kernel: pci 0000:00:15.5: BAR 13: failed to assign [io size 0x1000] 42 1月 18 10:01:27 maym kernel: pci 0000:00:15.4: BAR 13: failed to assign [io size 0x1000] 43 1月 18 10:01:27 maym kernel: pci 0000:00:15.3: BAR 13: failed to assign [io size 0x1000] 44 1月 18 10:01:34 rocky102 systemd[1]: media.mount: Failed with result 'exit-code'. 45 -- Subject: Unit failed 46 -- The unit media.mount has entered the 'failed' state with result 'exit-code'. 47 1月 18 10:01:34 rocky102 systemd[1]: Failed to mount /media. 48 -- 结果为“failed”。 49 1月 18 10:01:40 rocky102 dbus-daemon[843]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.resolve1.service': Unit dbus-org.freedesktop.resolve1.service not found.
journalctl -xb|grep -i error
journalctl -xb|grep -i warning标签:10,13,01,log,18,27,failed,demesg,var From: https://www.cnblogs.com/maym/p/17972005