Linux Logging Flashcards

1
Q

/user/log/dmesg

A

Kernel boot messages

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

/var/log/messages

A

Standard syslog messages

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

/var/log/secure

A

Security log messages. Info on login attempts.

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

/var/log/maillog

A

Local email log messages/

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

dmesg

A

Utility allowing an administrator to
view /var/log/dmesg file in text pager.
—level=,..:show levels specified. Abbreviated.
Ex: warn,err
-x:decode facility and level info to human readable.

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

Dmesg levels

A
0 emerg sys. unusable
1 alert immediate action
2 critical critical condition
3 err error condition
4 warn warning condition
5 notice normal but significant
6 info informational
7 debug debug-level
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Kernel messages

A

user: random user-level
mail: mail system
daemon: system daemon
auth: security/authorization
syslog: messages generated by syslog
lpr: line printer subsystem
news: network news subsystem

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

syslog

A

Timestamp, hostname generating, item generating event message.
-f: real time output

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

logger

A

Command to send info to /var/log/messages

-t: tag in””

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

journalctl

A

Defaults to journal w. oldest date at top.
-b: boot up, since
—disk-usage: amount of disk space journal consuming
-e: end
-F: reverse and folllow
-k: kernel only
—list-boots: shows list of recorded boot sessions
-n: newest number
-o: output format
verbose: all entry items with fields
json-pretty
systemd-cat
—rotate: rotate journal files
—since: with —until displays logs within specific window with time format “yyyy-mm-dd hh:mm:ss”
—until:
-u: logs of unit.
-x: log lines with text from message catalog. Not all will be available.

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

systemd journal

A
Binary file on everything
Kernel log msg.
System log msg. With the same formatting as syslog.
Syslog services output to stdout/stderr.
Defaults to /run/log/journal. Volatile
1.1.1.1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

journald configuration

A

/etc/systemd/journald.conf
[Journal]
Storage=
auto-default: will store to /var/log/journal and /run/log/journal
persistent: stored to /var/log/journal hierarchy
volatile: only sent to /run/log/journal
none: no data kept
SystemMaxUse=,RuntimeMaxUse=
SystemMaxFileSize=,RuntimeMaxFileSize=
MaxRetentionSec=

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

/etc/rsyslog.conf

A

Main configuration file for rsyslog logging daemon. SELECTOR LINES in format of .
Ex: *.info
File name off to the side indicates location.
With dash means that the recording can wait.

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

/etc/logrotate.conf

A

Main configuration file for rotate daemon responsible for managing storage and rotation of old files.
Can show rotate rate, keep size, date suffix, compression,

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

/etc/logrotate.d/

A

Extra logrotate config for other daemons to be placed.

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

logrotate

A

Will rotate log based on specified configuration file.