Logging wireless access point connections
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.
11 Answer
You can find some last connections in
sudo less /etc/NetworkManager/system-connections/* But the timestamp is of the form
1293853087To make it readable, you would use:
date -d "1970-01-01 +1293853087 seconds"
Sa 1. Jan 03:38:07 CET 2011For 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.logor 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.