From owner-freebsd-questions@FreeBSD.ORG Sat Jan 16 19:50:18 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C532A1065693 for ; Sat, 16 Jan 2010 19:50:18 +0000 (UTC) (envelope-from dotnox@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 2AFAB8FC13 for ; Sat, 16 Jan 2010 19:50:16 +0000 (UTC) Received: by ewy26 with SMTP id 26so2039969ewy.3 for ; Sat, 16 Jan 2010 11:50:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=vdWpiWkmIMZQstk08GvyNDvgsWcX6GvktzJ3sWtxF70=; b=V6il5BPHnN8EksCBrRwD3fYysTQ1WqJGSGiRosTsmPkOATWgtjkhqLvFIUh2qZNp4X yitOj8BUIpBKHI8jP2pJT8Osnq8dnCNaoRy1kVCJrOMtFUStxTnTlyYJzMoMIZ3CSc/n 76XSr2OkROYpytC6lT5RqEcm0VtQVHanrC1BU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=FZD1sWbvZEA7mdLoohuoNMRG8vXhG+38AfhLbDw6AoKHGQhtxEIZoVFVz4OETTpyle +0L8qd15gnpdY7saPFnLPZXHf4GVRiv7pNM1M3sXRuzZVTHJA/ys0U6rqbSKzmkWLCIo ovHtuMWcqfaPF670/kh2TglleIwiBw3FyjaH4= Received: by 10.213.107.69 with SMTP id a5mr4130588ebp.73.1263671405871; Sat, 16 Jan 2010 11:50:05 -0800 (PST) Received: from localhost ([89.28.2.75]) by mx.google.com with ESMTPS id 14sm1599032ewy.7.2010.01.16.11.50.05 (version=SSLv3 cipher=RC4-MD5); Sat, 16 Jan 2010 11:50:05 -0800 (PST) Date: Sat, 16 Jan 2010 21:50:02 +0200 From: Maxim Ianoglo To: freebsd-questions@freebsd.org Message-ID: <20100116215002.04ecccfb@gmail.com> In-Reply-To: <20100112145806.1de591f3@gmail.com> References: <20100112145806.1de591f3@gmail.com> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.18.5; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: bsdar/netstat issue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 19:50:18 -0000 Hello, i just was able myself to find out why netstat was showing different output on i386. My i386 machine was updated on 28 November, netstat was modified on 25 November, so seems that CVS server from which I have updated sources was a little bit outdated. Thank you. -- Maxim Ianoglo On Tue, 12 Jan 2010 14:58:06 +0200 Maxim Ianoglo wrote: > Hello, > > Got an issue. > > On FreBSD amd64 bsdsar dows not works properly because of netstat -b -i > -n > shows one extra column "Idrop" > $ uname -m > amd64 > $ netstat -b -i -n > Name Mtu Network Address Ipkts Ierrs Idrop Ibytes Opkts Oerrs Obytes Coll > bge0 1500 00:00:1a:19:3b:69 722511 0 0 413208866 447516 0 63777493 0 > > $ uname -imprs > FreeBSD 8.0-STABLE amd64 amd64 GENERIC > > In i386 netstat output is as was before > $ uname -m > i386 > $ netstat -b -i -n > Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll > wpi0* 2290 00:1b:77:d3:75:5e 0 0 0 0 0 0 0 > > $ uname -imprs > FreeBSD 8.0-STABLE i386 i386 NAFNOTE > > To make bsdsar work properly I have modified it > here is the diff: > $ diff -u /usr/local/bin/bsdsar_gather /usr/local/bin/bsdsar_gather.new > --- /usr/local/bin/bsdsar_gather 2010-01-12 14:19:09.000000000 +0200 > +++ /usr/local/bin/bsdsar_gather.new 2010-01-12 14:18:13.000000000 +0200 > @@ -91,11 +91,11 @@ > # now lets pull data from netstatlist > foreach $ifaceline (@netstatlist) { > chomp $ifaceline; > - ($ifacename, $Mtu, $Network, $Address, $inpkts, $inerrs, $inbytes, $outpkts, $outerrs, $outbytes, $coll) = split/\s+/,$ifaceline; > + ($ifacename, $Mtu, $Network, $Address, $inpkts, $inerrs, $idrops, $inbytes, $outpkts, $outerrs, $outbytes, $coll) = split/\s+/,$ifaceline; > if ( $coll eq "") { > # $coll is empty because of a blank column, assume this is Address > # so try again wthout it > - ($ifacename, $Mtu, $Network, $inpkts, $inerrs, $inbytes, $outpkts, $outerrs, $outbytes, $coll) = split/\s+/,$ifaceline; > + ($ifacename, $Mtu, $Network, $inpkts, $inerrs, $idrops, $inbytes, $outpkts, $outerrs, $outbytes, $coll) = split/\s+/,$ifaceline; > } > > $ifaceinfo .= "$ifacename,$inpkts,$inerrs,$inbytes,$outpkts,$outerrs,$outbytes,$coll\|"; > > > Did anyone faced such issue before ? Or thie is not a bug with netstat/bsdsar. > > Thank you. > -- > Maxim Ianoglo a.k.a dotNox ( dotNox@gmail.com )