108.2 System Logging Flashcards

1
Q

Format for sending log messages to a remote server.

A

facility.priority action

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

Valid priorities in facility.priority include:

A

panic, alert, crit, err, warn, notice, info, debug

Difference with /etc/syslog.conf:
emerg and warning

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

Log daemon that tracks and maintains system logs of system activities.

A

syslogd

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

Command to enable syslogd utility to receive messages from the network.

A

syslogd -r

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

Command to specify a syslogd configuration file other than /etc/syslog.conf

A

syslogd -f

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

Command to turn on syslogd debug mode.

A

syslogd -d

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

Command to specify a time interval between two timestamp lines in a log.

A

syslogd -m

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

A shell command interface to the syslog system log module.

A

logger

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

A component of systemd that manages and views log files created by the journal component of systemd.

A

journalctl

Used to access binary systemd journal log files.

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

A system daemon that intercepts and logs kernel messages.

A

klogd - Kernel Log Daemon

No config file, only command line options

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

klogd does what?

A
  • Tracks kernel messages by prioritizing them.
  • Listens to the source for kernel messaging and intercepts the messages.
  • Runs as a client of syslogd where the kernel messages are sent through syslogd.
  • Can also act as a stand-alone program.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The highest priority level in /etc/syslog.conf.

A

emerg

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

Priority order from highest to lowest in /etc/syslog.conf.

A

emerg, alert, crit, err, warning, notice, info, debug

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

Valid facilities in facility.priority include:

A

auth, user, kern, cron, daemon, mail, locale

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

The best way to run the logrotate command and why.

A

In a daily cron job, because it prevents log files from becoming too large.

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

rsyslog is older or newer than syslog?

A

Newer

17
Q

logrotate keeps which time periods of log files?

A

daily, weekly, monthly, or yearly

18
Q

Path to the conf file for logrotate.

A

/etc/logrotate.conf

19
Q

logrotate configuration options:

A

rotate 4 - for 4 weeks of log files
weekly - rotate log files weekly
create - create new empty log files after rotating
compress - compress rotated log files
include - reads log file rotation parameters from various files in /etc/logrotate.d/
shred - ensures that log files are not readable after their scheduled deletion

20
Q

Path where some applications store log rotation parameters.

A

/etc/logrotate.d/[pkgname]

21
Q

Path to the conf file for syslogd.

A

/etc/syslog.conf

22
Q

The /etc/syslog.conf file contains:

A

Rules for logging system messages. Each rule is composed of a selector field and an action field. The selector field is composed of the facility and priority separated by a dot. Case insensitive.
E.g. kern.panic @192.168.1.100

23
Q

Path to the conf file for journald and the journalctl utility.

A

/etc/systemd/journald.conf

24
Q

The Storage option for /etc/systemd/journald.conf configures where journal data is stored. The options are:

A

volatile - in memory only
persistent - stores data to the disk and creates the directory if necessary
auto - the default, like persistent but does not create the directory
none - turns off storage and all log data is dropped

25
Q

Path to the file used for logs sent by mail using logger.

A

/etc/logfiles/mail-logs

26
Q

Command to send logs by mail to log file for system messages at err level or higher.

A

logger -p mail.err -f /etc/logfiles/mail-logs

27
Q

Default location for logging services to store log files.

A

/var/log

28
Q

Path to the directory for persistent journal logs created by journalctl.

A

/var/log/journal/

Safe to delete log files but not the journal directory.