Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can one differentiate between the start of a network connect and the end of one, from the logs listed in /var/log/messages?

All the logs look identical.

share|improve this question
What version of Ubuntu are you running? A few log files, including this one, are named differently in different versions. (Please edit your post to include this information...then you can flag this comment as obsolete.) – Eliah Kagan May 27 '12 at 18:33
@EliahKagan @Ian Or to phrase it another way, in Ubuntu 12.04 desktop I get the following error message: ls: cannot access /var/logs/messages: No such file or directory. Please provide more information about what, exactly, you are asking about. – irrational John May 27 '12 at 18:39
@irrationalJohn It should actually be /var/log/messages, I neglected to notice that error in the question when I edited it originally. Anyway, /var/log/dmesg used to be called /var/log/messages, on older versions of Ubuntu (e.g., 10.04 LTS). I think it's still useful to have the release version in the question, though. – Eliah Kagan May 27 '12 at 18:51
@EliahKagan Definitely need more information. There is no way to provide an "answer" to the question as it is currently asked. – irrational John May 27 '12 at 18:57
Indeed. Ian, please also add specific lines taken from your /var/log/messages file to your question, so it's clear exactly what you're asking and exactly why it's unclear if they are describing connection or disconnection. – Eliah Kagan May 27 '12 at 18:59

On Ubuntu Server 12.04, that information usually goes to /var/log/syslog.
I have intentionally unplugged a ethernet card on a server and connected it back, I got this:

Jun  6 20:16:34 tagua kernel: [ 4416.930972] r8169 0000:01:06.0: eth0: link down
Jun  6 20:16:34 tagua kernel: [ 4416.932817] ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun  6 20:19:09 tagua kernel: [ 4571.990507] r8169 0000:01:06.0: eth0: link up
Jun  6 20:19:09 tagua kernel: [ 4571.991172] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

If I run sudo ifdown eth0 the output is (among other lines):

Jun  6 20:28:05 tagua NetworkManager[1295]:  (eth0): carrier now OFF (device state 10)

When I reactivate it with sudo ifup eth0

Jun  6 20:28:23 tagua NetworkManager[1295]:  (eth0): carrier now ON (device state 10)
share|improve this answer

Your Answer


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.