From owner-freebsd-net@FreeBSD.ORG Thu Mar 21 13:02:50 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 634626FD for ; Thu, 21 Mar 2013 13:02:50 +0000 (UTC) (envelope-from nbari@inbox.im) Received: from us3.route.mx (us3.route.mx [107.21.107.127]) by mx1.freebsd.org (Postfix) with ESMTP id 214396C7 for ; Thu, 21 Mar 2013 13:02:49 +0000 (UTC) Received: (route-mx 75847 invoked from network); 21 Mar 2013 13:02:49 -0000 Received: from unknown (HELO nbari-z200.diz.la) (nbari@inbox.im@route.mx) (envelope-sender ) by us3.route.mx (route-mx) with SMTP for ; 21 Mar 2013 13:02:48 -0000 Message-ID: <514B04F5.5010603@inbox.im> Date: Thu, 21 Mar 2013 13:02:45 +0000 From: Nicolas de Bari Embriz Garcia Rojas User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130314 Thunderbird/17.0.4 MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: netstat -ib Obytes empty for alias on main interface Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Mar 2013 13:02:50 -0000 Hi all, I want to know the total of bytes in and out of each IP address assigned as an alias to an bce0 interlace. if I run netstat -ib I get something like this: > netstat -ib Name Mtu Network Address Ipkts Ierrs Idrop Ibytes Opkts Oerrs Obytes Coll bce0 1500 78:2b:cb:71:aa:7f 1733163 0 0 199210984 1562794 0 339429658 0 bce0 1500 174.142.192.0 hostserver 225655 - - 33210469 1588858 - 317543703 - bce0 1500 fe80::7a2b:cb fe80::7a2b:cbff:f 0 - - 0 0 - 0 - bce0 1500 174.142.193.5 jail1 9930 - - 533577 0 - 0 - bce0 1500 174.142.193.5 jail2 130567 - - 269049579 0 - 0 - bce0 1500 174.142.193.5 jail3 264 - - 14072 0 - 0 - bce0 1500 174.142.193.5 jail4 978747 - - 94504639 0 - 0 - bce0 1500 174.142.193.5 jail5 329095 - - 117322843 0 - 0 - bce0 1500 174.142.193.5 jail6 260 - - 13998 0 - 0 - bce0 1500 72.55.175.68/ jail7 141953 - - 45070407 0 - 0 - ... ... lo1 16384 424903 0 0 30341272 424880 0 30338825 0 lo1 16384 172.16.13.0 172.16.13.1 30415 - - 2173077 30361 - 2172801 - lo1 16384 172.16.13.2/3 172.16.13.2 104842 - - 8848322 40993 - 3957589 - lo1 16384 172.16.13.3/3 172.16.13.3 8696 - - 351244 8668 - 349132 - lo1 16384 172.16.13.30/ 172.16.13.30 344856 - - 23862253 344856 - 23862253 - I only have Input bytes per IP but not Obytes for the alias on bce0 but I do have the Ibytes and Obytes for the lo1 cloned interface, also any idea of how to avoid truncating the output, the network IP's display part of the IP not the full address, my idea is to use this output to create some stats. Any ideas ? thanks in advance. regards.