Graphical or automatic "keep-alive" program?
Anthony M. Rasat
anthony.rasat at gmail.com
Wed Dec 3 11:58:30 UTC 2008
>I need something that will either automatically function as a keep-alive
Please bear with because I wrote this in my blackberry. I haven't test it and all.
You need to add a line of crontab and write a small shell script. The end result is ping to the gateway 30 times within a minute. I think that should be reasonably small traffic.
0) Login to your wife's user account. Open the terminal application.
1) Make a hidden directory ".script" and change current directory to it:
2) Write this to file id-gw.sh and make it executable:
echo `ip ro|grep "default"|cut -f 2 -d " "`
chmod 755 id-gw.sh
3) Then add this line to account's crontab:
*/1 * * * * ping -c 30 `~/.script/id-gw.sh` 2>&1 >> /dev/null
4) You're done.
1) The script id-gw.sh when executed will notify ping the IP address of the current network default gateway, no matter what network it was at. This gateway is supposed to be reachable unless there is no network available.
2) Crontab line will do the actual ping to that gateway IP address and suppressed any comment or error to the void.
3) The end result, God permitted, would be a series of ping to gateway within one minute, I supposed will keep power management let WiFi awake all the time. And of course, without human interaction.
Hope that helps solving your problem.
Anthony M. Rasat
Manager - Technical, Network and Support Division
PT. Jawa Pos National Network
Graha Pena Jawa Pos Group Building, 5th floor
Jln. Raya Kebayoran Lama 12, Jakarta Barat 12210
More information about the ubuntu-users