Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 1996 15:47:00 -0400 (EDT)
From:      "Marc G. Fournier" <scrappy@ki.net>
To:        current@freebsd.org
Subject:   Updates to In/Out Packets in tun driver...
Message-ID:  <Pine.NEB.3.93.960531154022.2864A-100000@ki.net>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.93.960531154022.2864A-100000>