COMMAND LINE KUNG FU

Lệnh hiển thị nhật ký hệ thống trên Linux

73
author Đặng Văn Chương - 2022-08-19 09:23:30 (GMT+7)

Để xem nhật ký hệ thống do systemd thu thập trên Linux chúng ta dùng lệnh sau:

bash (non-root)
journalctl
Kết quả
-- Logs begin at Thu 2020-05-21 13:54:14 +07, end at Thu 2022-08-11 14:26:24 +07. --
May 21 13:54:14 ubuntu-server kernel: Linux version 5.4.0-31-generic (buildd@lgw01-amd64-059) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #35-Ubuntu SMP Thu May 7 20:>
May 21 13:54:14 ubuntu-server kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-31-generic root=UUID=d85ae6ae-019c-458e-a8d0-520df727e0d5 ro maybe-ubiquity
May 21 13:54:14 ubuntu-server kernel: KERNEL supported cpus:
May 21 13:54:14 ubuntu-server kernel:   Intel GenuineIntel
May 21 13:54:14 ubuntu-server kernel:   AMD AuthenticAMD
May 21 13:54:14 ubuntu-server kernel:   Hygon HygonGenuine
May 21 13:54:14 ubuntu-server kernel:   Centaur CentaurHauls
May 21 13:54:14 ubuntu-server kernel:   zhaoxin   Shanghai
May 21 13:54:14 ubuntu-server kernel: x86/fpu: x87 FPU will use FXSAVE
May 21 13:54:14 ubuntu-server kernel: BIOS-provided physical RAM map:
May 21 13:54:14 ubuntu-server kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
May 21 13:54:14 ubuntu-server kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
May 21 13:54:14 ubuntu-server kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
May 21 13:54:14 ubuntu-server kernel: BIOS-e820: [mem 0x0000000000100000-0x000000007fff6fff] usable
May 21 13:54:14 ubuntu-server kernel: BIOS-e820: [mem 0x000000007fff7000-0x000000007fffffff] reserved
May 21 13:54:14 ubuntu-server kernel: BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
May 21 13:54:14 ubuntu-server kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
May 21 13:54:14 ubuntu-server kernel: NX (Execute Disable) protection: active
May 21 13:54:14 ubuntu-server kernel: SMBIOS 2.4 present.
May 21 13:54:14 ubuntu-server kernel: DMI: Red Hat KVM, BIOS 0.5.1 01/01/2011
May 21 13:54:14 ubuntu-server kernel: Hypervisor detected: KVM
May 21 13:54:14 ubuntu-server kernel: kvm-clock: Using msrs 4b564d01 and 4b564d00
May 21 13:54:14 ubuntu-server kernel: kvm-clock: cpu 0, msr 6f601001, primary cpu clock
May 21 13:54:14 ubuntu-server kernel: kvm-clock: using sched offset of 2287644081 cycles
May 21 13:54:14 ubuntu-server kernel: clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
May 21 13:54:14 ubuntu-server kernel: tsc: Detected 2400.084 MHz processor
May 21 13:54:14 ubuntu-server kernel: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
May 21 13:54:14 ubuntu-server kernel: e820: remove [mem 0x000a0000-0x000fffff] usable
May 21 13:54:14 ubuntu-server kernel: last_pfn = 0x7fff7 max_arch_pfn = 0x400000000
May 21 13:54:14 ubuntu-server kernel: MTRR default type: write-back
May 21 13:54:14 ubuntu-server kernel: MTRR fixed ranges enabled:
May 21 13:54:14 ubuntu-server kernel:   00000-9FFFF write-back
May 21 13:54:14 ubuntu-server kernel:   A0000-BFFFF uncachable
May 21 13:54:14 ubuntu-server kernel:   C0000-FFFFF write-protect
May 21 13:54:14 ubuntu-server kernel: MTRR variable ranges enabled:
May 21 13:54:14 ubuntu-server kernel:   0 base 0080000000 mask FF80000000 uncachable
May 21 13:54:14 ubuntu-server kernel:   1 disabled
May 21 13:54:14 ubuntu-server kernel:   2 disabled
May 21 13:54:14 ubuntu-server kernel:   3 disabled
May 21 13:54:14 ubuntu-server kernel:   4 disabled
May 21 13:54:14 ubuntu-server kernel:   5 disabled
May 21 13:54:14 ubuntu-server kernel:   6 disabled

Bạn có làm được theo hướng dẫn này không?

Lệnh liên quan

Cloud VPS tại 123HOST

Hiệu năng, ổn định và bảo mật

Xem thêm
Thông tin tác giả
Bình luận

Tính năng đang được phát triển

Đang tải bình luận