Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a ubuntu server, type 12.04 that serves as a mysql box and intranet server. Without notice it dropped all packets (www, ping and mysql). What logs should i check - the messages log is not in the usual /var/log location, and how can I read the "date" out of what the dmesg log states?

no other servers on the same switch was down - and it was down for about 3-5 minutes.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The messages log is not in the usual /var/log location

The messages log file is called /var/log/syslog in Ubuntu. To see which system messages are included in syslog see /etc/rsyslog.conf. On my Ubuntu 12.04 it looks like this:

*.*;auth,authpriv.none     -/var/log/syslog

which logs everything.

(For the curious, the dash mark (-) that precedes the file path disables running sync() to flush the file system buffers after writing out each line.)

How can I read the "date" out of what the dmesg log states?

/var/log/kern.log provides timestamps to dmesg's output.

What logs should I check?

You are probably interested in kernel messages like these:

Mar 13 08:33:22 ubuntu kernel: [213187.021594] ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar 13 08:33:24 ubuntu kernel: [213188.913440] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mar 13 08:33:46 ubuntu kernel: [213199.013501] eth0: no IPv6 routers present

You can find them in both /var/log/kern.log and /var/log/syslog. The former is convenient to quickly locate kernel messages, the latter is convenient to provide context for those messages, that is, to see which other activities were logged when they were generated.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.