Date: Sat, 21 Sep 1996 10:41:12 -0500 (CDT) From: Mike <flaq@synwork.com> To: questions@freebsd.org Subject: Help with PPP Message-ID: <Pine.BSI.3.94.960921103729.647A-100000@synwork.com>
next in thread | raw e-mail | index | archive | help
I am running the following script from cron to verify my PPP connection and if necessary, reestablish it. The script works fine except when ppp is invoked from the script, it is a CPU hog! Any suggestions on fixing this? #!/bin/sh PATH=/sbin:/usr/sbin:/bin:/usr/bin ipaddr="199.3.232.12" # which ip address to check for basic connectivity ppptag="simplesite" # which tag in ppp.conf to use to redial pppline=`ps -axu | grep "[p][p][p][) ]"` if [ ! -z "$pppline" ] ; then if ping -c 10 $ipaddr 2> /dev/null | grep -q "100% packet loss" ; then ppppid=`echo $pppline | awk '{print $2}'` kill $ppppid sleep 3 ppp $ppptag & fi else ppp $ppptag & fi Partial output of 'top' ------------------------- load averages: 1.46, 0.67, 0.33 10:38:21 48 processes: 2 running, 45 sleeping, 1 zombie Cpu states: 20.5% user, 0.0% nice, 78.7% system, 0.8% interrupt, 0.0% idle Memory: 24M Active, 3300K Inact, 5240K Wired, 14M Cache, 364K Free Swap: 77M Total, 77M Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 600 root 94 0 456K 660K run 3:06 89.04% 89.04% ppp ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Syn-Work Media, Inc. | WWW Development & Hosting | Life Safety http://www.synwork.com | Systems Integration | CCTV mike@synwork.com | Voice/Data/Fiber | Access Control Flaq on IRC | Dukane Distributor | BICSI/RCDD :|:|:|: Powered By FreeBSD :|:|:|: Turning PC's Into Workstations ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.94.960921103729.647A-100000>