From owner-freebsd-questions Mon Jan 29 18:52:42 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA11721 for questions-outgoing; Mon, 29 Jan 1996 18:52:42 -0800 (PST) Received: from netrail.net (mdz@netrail.net [205.215.6.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id SAA11685 for ; Mon, 29 Jan 1996 18:52:28 -0800 (PST) Received: (from mdz@localhost) by netrail.net (8.6.12/8.6.12) id VAA17885; Mon, 29 Jan 1996 21:53:19 -0500 Date: Mon, 29 Jan 1996 21:53:19 -0500 (EST) From: Matt Zimmerman To: questions@freebsd.org Subject: netstat oddity: bug or feature? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org Precedence: bulk I have a set of interfaces (created by Emerging Technologies' frame relay driver), etha500, etha501, and etha502. When I check its status using netstat, i.e.: netstat -n -I etha500 ...I get accurate output, like so: Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll etha5 1500 339288 0 304238 0 0 etha5 1500 205.215.5.4 205.215.5.5 339288 0 304238 0 0 However, when I use the wait (-w) option, like so... netstat -n -I etha500 -w 5 input (eth0) output input (Total) output packets errs packets errs colls packets errs packets errs colls 0 0 0 0 0 719553 1 753094 9 3040 0 0 0 0 0 368 0 380 0 1 It gives me statistics for eth0 instead, which is inactive. Some software of mine uses netstat to display up-to-date status information on various interfaces, so I'm wondering if this is a condition I can correct. I thought it might be a problem with the driver, but since netstat gathers the stats correctly without the -w option, the values are obviously there. I browsed through if.c from netstat briefly, but nothing slapped me in the face. There seems to be a difference between how intpr() and sidewaysintpr() gather their data, but I don't see it. Any ideas? Please CC replies to me, as I'm not on the list... // Matt Zimmerman Chief of System Management NetRail, Inc. // mdz@netrail.net sales@netrail.net // (703) 524-4800 [voice] (703) 524-4802 [data] (703) 534-5033 [fax]