M BUZZ CRAZE NEWS
// news

Logging wireless access point connections

By Emma Martinez

Is there a way to find timestamps of when I connected/disconnected to wireless networks (so I can see where I was at some point in the past)? I can't seem to find any log files with this information (and my system doesn't seem to save logs older than about a month, anyway).

If no such log file exists, it possible to write a script that will do this for me?

Thanks!

P.S. I'm running Ubuntu 10.04.

1

1 Answer

You can find some last connections in

sudo less /etc/NetworkManager/system-connections/* 

But the timestamp is of the form

1293853087

To make it readable, you would use:

date -d "1970-01-01 +1293853087 seconds"
Sa 1. Jan 03:38:07 CET 2011

For future use, it might be better to insert a few code lines to /etc/networks/ifup.d/YourScript

echo $(date) " "$(if [ "$IFACE" = eth1 ]; then iwconfig | egrep -o "ESSID:*"
fi) >> /var/log/myip.log

or something similar.

I haven't done so, so there are surely some problems to solve. Maybe you don't have write access to /var/log/myip.log, and have to create it with sudo touch ... before, and allow some group (network?) to write to it.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy