Logs Flashcards

1
Q

Where are log messages located?

A

/var/log

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

Where are ssh login logs stored?

A

/var/log/secure

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

Where are system logs stored?

A

/var/log/messages

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

What is journald?

A

journal daemon for systemd

Aggregates logs across system into one location

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

How do you get the man page for journald?

A

man systemd-journald

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

How do you access journals?

A

journalctl

  • x Additional information
  • f Follow
  • dumps all information inside journal daemon
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where are journal messages stored by default?

A
/run/log/journal
*/run directory is ephemeral like var (not persistent)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How would you make journal messages persistent?

A

Edit /etc/systemd/journald.conf
Storage=persistent
systemctl restart systemd-journald
*journal messages will be stored /var/log/journal

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

How can you get information on the boot performance?

A

systemd-analyze
systemd-analyze blame
*blame details how long each unit configuration file took

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

What determines the log level for logs?

A

/etc/rsyslog.conf

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

What are the different log levels?

A

“emerg” (0), “alert” (1), “crit” (2), “err” (3), “warning” (4), “notice” (5), “info (6), “debug” (7)
i.e journalctl -p info

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