<pid>, process ID
<n>s|m|h|d, n seconds|minutes|hours|days of no traffic
-h, usage and options (this help)
-l, see this script"
killppp is a shell script that kills the ppp process after
specified time of no traffic. This is especially useful
for dial-up users who pay per time-unit of being connected.
The typical use for it, is to start a large download along
with killppp and go away. The script will shut down ppp
after the downloading is done. Thus saving unnecessary
cost of unused network connectivity.
Depending on how your linux is configured you may need to
be root to have the right to kill a ppp process and it may
have to be the ppp daemon (pppd).
To find the pid of your ppp process type: ps aux | grep ppp
How this script works? Once activated, killppp checks every
minute for network traffic on the ppp0 device. As long as
data is passing through, killppp does nothing. Upon no
traffic killppp starts counting time until it reaches the
specified time and kills the ppp process.
killppp 8249 5m
This will kill the process 8249 after 5 minutes of no