Chapter 11: Logging Files
Original slides from Dr. James Walden at Northern Kentucky University.
syslogd daemon.
cat,
grep, head, and tail can parse them.
/var/log
/var/log/syslog
/var/adm
| File | Program | Freq | Contents |
|---|---|---|---|
acpid | acpid | - | power related events |
boot.log | rc scripts | monthly | system startup scripts |
cron | cron | weekly | cron execution and errors |
cups | CUPS | weekly | printing related messages |
dmesg | kernel | - | kernel message buffer |
faillog | login | weekly | unsuccessful login attempts |
/etc/httpd | httpd | daily | Apache HTTP server logs |
lastlog | login | - | last login time per user |
mail | mailers | weekly | mail facility messages |
| File | Program | Freq | Contents |
|---|---|---|---|
messages | various | weekly | main system log |
samba/* | smbd | weekly | Samba file sharing |
secure | sshd | monthly | private authorization messages |
sulog | su | - | successes and failures |
syslog | various | weekly | main system logfile |
warn | various | weekly | warning and error messages |
syslog has three parts:
/etc/syslog.conf
/var/log/maillog
| Facility | Programs that use it |
|---|---|
| auth | authorization commands |
| cron | cron |
| daemon | system daemons |
| ftp | ftpd |
| kern | kernel |
| lpr | line printer spooling |
sendmail | |
| syslog | syslogd |
| user | user processes |
| Level | Approximate meaning |
|---|---|
| emerg | panic situations |
| alert | urgent situations |
| crit | critical conditions |
| err | other error conditions |
| warning | warning messages |
| notice | might merit investigation |
| info | information messages |
| debug | for debugging only |
| Action | Meaning |
|---|---|
| filename | append message to local file |
| @hostname | forward to syslogd on hostname |
| @ipaddress | forward to syslogd at ipaddress |
| |fifoname | write to named pipe |
| user1,user2,… | write to screens of listed users |
| * | write to screens of all users |
# emergencies: tell everyone who is logged in
*.emerg *
# warnings: store them in message log
*.warning /var/log/messages
# kernel: store them in local log
kern.info /var/log/kern.log
# send to network logger
auth.info @netloghost
|
Modified: 2013-09-05T20:32 User: Guest Check: HTML CSSEdit History Source |
Apply to CSU |
Contact CSU |
Disclaimer |
Equal Opportunity Colorado State University, Fort Collins, CO 80523 USA © 2015 Colorado State University |
|