System Logging and NTP Flashcards

1
Q

What is the format of a rsyslog rule?

A

■ facility.severity location

■ EX: mail.* /var/log/maillog

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

What journalctl option mimicks ‘tail -f’

A

■ journalctl -f

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

How can journald logs be made persistent?

A
  1. Create a /var/log directory for journald.service
    ]# mkdir -p /var/log/journal
  2. Change ownership to root:systemd-journal
    ]# chown root:systemd-journal /var/log/journal
  3. Set permissions on /var/log/journal
    ]# chmod 2775 /var/log/journal
  4. Tell journald to reopen its log files
    ]# killall -USR1 systemd-journald
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What command shows an overview of the current time-related system settings?

A

■ timedatectl [status]

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

Where can a list of available timezones be found?

A

■ timedatectl list-timezones

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

What command will assist in finding the correct time zone?

A

■ tzselect

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

How can a message with a severity be sent to test rsyslogd configurations?

A

■ logger -p [facility.severity] “message to be logged”

■ EX: logger -p authpriv.alert “Logging test authpriv.alert”

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