From owner-freebsd-questions@FreeBSD.ORG Tue Jan 12 13:24:58 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 2C4F61065672 for ; Tue, 12 Jan 2010 13:24:58 +0000 (UTC) (envelope-from dotnox@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id B12818FC0C for ; Tue, 12 Jan 2010 13:24:57 +0000 (UTC) Received: by bwz5 with SMTP id 5so14512430bwz.3 for ; Tue, 12 Jan 2010 05:24:54 -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:x-mailer:mime-version:content-type :content-transfer-encoding; bh=dlWPI0EROodVloTsiP4R8ga25Y57u52Y/SPDtzmtLLk=; b=IRVJr5yepWjER1SajAsbVzmW7GY5lc6o926rlP/KWzgvFLqbZdOBfseObnuVmGTL9t nD72qU7Fgqr8P4edsc0JTZkjnQveqF7YDoXXsY1+bX4hdlwotZfLNS4SuFcdtxTlBVIJ JBueD+lJG0afvdRUARMSVJUhruo9PZoUalQa4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:x-mailer:mime-version:content-type :content-transfer-encoding; b=OgCNzOLHhItokbuSd3BG9627hz5tBiNnWhNjguepSqB7Drsqhmec0DQFLxsR9Mrie9 QsAZwn+Bwze5WYsNtDqRi1OoAKHPSdZF96xhbkkZtellvFacgjepReZEucSidO8lUAnY vIAAGhqlFS7tZi1qIaMnPJ6R4Ss5Omo3eskDw= Received: by 10.204.14.84 with SMTP id f20mr478428bka.209.1263301090430; Tue, 12 Jan 2010 04:58:10 -0800 (PST) Received: from localhost ([89.28.2.75]) by mx.google.com with ESMTPS id 15sm9352030bwz.4.2010.01.12.04.58.09 (version=SSLv3 cipher=RC4-MD5); Tue, 12 Jan 2010 04:58:09 -0800 (PST) Date: Tue, 12 Jan 2010 14:58:06 +0200 From: Maxim Ianoglo To: freebsd-questions@freebsd.org Message-ID: <20100112145806.1de591f3@gmail.com> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.5; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: 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: Tue, 12 Jan 2010 13:24:58 -0000 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 )