journalctl Flashcards

1
Q

journalctl

Help pages 1-2

A

Used to query the contents of the systemd journal logs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

journalctl -b [ID] [+- offset]

A

-b Show messages from a specific boot.

[ID]

boot ID can be entered

[+- offset]

  • 1 would display last boot
  • 2 would display boot before last
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

journalctl -S -U

–since –until

A

-S –since

Shows logs with timestamps since the date chosen. The format can be in 00:00:00 or string format.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

journalctl –list-boots

A

–list-boots

Lists the previous boot numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

journalctl -u

A

-u

Shows logs filtered by systemd unit.

example: nginx.service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

journalctl -f

A

-f –follow

Shows only the most recent log entries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

journalctl -r

A

-r –reverse

Reverses output so newest entries are first.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly