From owner-freebsd-current Fri May 31 12:47:00 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA03138 for current-outgoing; Fri, 31 May 1996 12:47:00 -0700 (PDT) Received: from ki.net (root@ki.net [205.150.102.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA03121 for ; Fri, 31 May 1996 12:46:56 -0700 (PDT) Received: from localhost (scrappy@localhost) by ki.net (8.7.5/8.7.5) with SMTP id PAA03369 for ; Fri, 31 May 1996 15:47:00 -0400 (EDT) Date: Fri, 31 May 1996 15:47:00 -0400 (EDT) From: "Marc G. Fournier" To: current@freebsd.org Subject: Updates to In/Out Packets in tun driver... Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi... I've written a really simple script/program that queries the snmpd daemon to get in/out packets from a PPP linkup I'm playing with, but it doesn't look like the tun driver updates its data with any sort of regularity :( I have a cron job that goes out and simply does: #!/bin/sh SNMPGET=/usr/local/bin/snmpget IN=`$SNMPGET -v 1 ki.net public 2.2.1.ifInOctets.3 | awk '{print $3}'` OUT=`$SNMPGET -v 1 ki.net public 2.2.1.ifOutOctets.3 | awk '{print $3}'` DATE=`/home/staff/scrappy/bin/strepoch` echo "$DATE $IN $OUT" >> /home/staff/scrappy/snmp/tun0.values The output looks like: interfaces.ifTable.ifEntry.ifInOctets.3 = 10301676 interfaces.ifTable.ifEntry.ifOutOctets.3 = 16010456 Before the awk statements, of course... Now, my data file is looking like: 833569206 8461376 13697376 833569505 8822660 14141820 833569804 9067520 14527744 833570105 9067520 14527744 833570405 9067520 14527744 833570706 9067520 14527744 833571005 9738652 15338092 833571306 9738652 15338092 833571604 10301984 16010456 Notice that there is a stretch of 4 time periods where nothing has changed (I'm pumping a near continous stream of news across this link), then it changes and is quiet for 2 periods...then, the last period reported, I manually ran the required snmpget command twice: interfaces.ifTable.ifEntry.ifInOctets.3 = 10152604 interfaces.ifTable.ifEntry.ifOutOctets.3 = 15837052 then: interfaces.ifTable.ifEntry.ifInOctets.3 = 10301676 interfaces.ifTable.ifEntry.ifOutOctets.3 = 16010456 So, the question is...what triggers an update? X bytes? As i said, its a near continous stream of bytes going across the link (we've got a link up between two sites passing news, so that that news traffic doesn't interfere with our main bandwidth...and doesn't have to go through 7 hops to get from one site to the other) Marc G. Fournier scrappy@ki.net Systems Administrator @ ki.net scrappy@freebsd.org