Click to See Complete Forum and Search --> : Automatically Kill pppd after no/little traffic after certain amount of time


ViMan
07-15-2002, 06:43 AM
I was just wondering if there is any way that you can kill your pppd if, for example, you have downloaded under 5K in the past 5 minutes. This is useful, for example, when you have multiple wget connections and are leaving them on for the night (I'm using a modem dial-up connection). So instead of the downloads finishing early and me staying connected, I want to be disconnected if there is little or no traffic for a certain amount of time. Is there any such utility or script? Thanks for your time.

danrees
07-15-2002, 06:50 AM
You can use the idle option with pppd. E.g. in my /etc/ppp/peers/bt for BTopenworld:

hide-password
noauth
connect "/usr/sbin/chat -f /etc/chatscripts/bt"
/dev/ttyS0
115200
defaultroute
noipdefault
user *********
ipparam bt
usepeerdns
# disconnect after 10 idle minutes
idle 600

However, this will only disconnect you if no data is transferred - if you have an IM app running for example, it probably won't work.