From owner-freebsd-questions@FreeBSD.ORG Sat Sep 20 09:09:40 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2B8B16A4B3 for ; Sat, 20 Sep 2003 09:09:40 -0700 (PDT) Received: from web13409.mail.yahoo.com (web13409.mail.yahoo.com [216.136.172.17]) by mx1.FreeBSD.org (Postfix) with SMTP id D4C5343FE3 for ; Sat, 20 Sep 2003 09:09:39 -0700 (PDT) (envelope-from h2g2_jimmiejaz@yahoo.com) Message-ID: <20030920160939.15862.qmail@web13409.mail.yahoo.com> Received: from [216.154.6.12] by web13409.mail.yahoo.com via HTTP; Sat, 20 Sep 2003 09:09:39 PDT Date: Sat, 20 Sep 2003 09:09:39 -0700 (PDT) From: jimmie james To: freebsd-questions@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: ppp and downloaded MBs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2003 16:09:40 -0000 >$ ppp -auto tdsl >$ ppp -v /var/run/internet dial # i used "set server >/var/run/internet" in /etc/ppp/ppp.conf >logged the bytes sent and received so i could calc the >downloaded MB per month (cause i use MB limited dsl) >any ideas how to calc the downloaded MB per month ? or >is there a >better way to establish the internet connection using >tdsl ? What I do, is use a perl sysinfo script, (http://www.geocities.com/h2g2_jimmiejaz/sys0pl.txt) just rename it to sys.pl and chmod 755 (runs in console, or irc as /exec -o ... The only problem with it is, if you reboot, it wipes the buffers of the info... The relevent lines are. (I'm using straight ppp, so you'd have to change tun0 to your device, and count the correct portion of netstat -i -n -b for this part.. head -n1 | awk '{print \$10}') It might not be excatly what you need, but it can give you an idea of what your transfer rate is, in and out) This is how it looks: root@fortytwo.daemon.sh FreeBSD 4.9-PRERELEASE | Sound: AudioPCI ES1373-B at /dev/pcm0 | Memory: 167 of 257 mb (65%)| Disk Usage(ad0): 2.0 of 6.8 gb (29%) | GFX: 1280x960 @ 24, bpp | Net: I/O: tun0 In: 27.50M Out: 4.09M | Uptime: 13:03, 6 users, load averages: 2.71, 2.73, 2.78 __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com