From owner-freebsd-net@FreeBSD.ORG Sun Nov 30 05:04:35 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D59B5106564A for ; Sun, 30 Nov 2008 05:04:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id B139D8FC12 for ; Sun, 30 Nov 2008 05:04:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id mAU54Y7j090900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 29 Nov 2008 21:04:34 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49321EE2.6020001@freebsd.org> Date: Sat, 29 Nov 2008 21:04:34 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Julian Elischer References: <4931A5B6.1060000@mWare.ca> <49321494.90706@elischer.org> In-Reply-To: <49321494.90706@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: Mykel , freebsd-net@freebsd.org Subject: Re: Determining counts or size of routing table? (netstat performance?) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2008 05:04:35 -0000 Julian Elischer wrote: > Mykel wrote: >> Got a few 6.x machines running OpenBGPd with a few BGP full-feeds and a >> handful of peers... I'd like to determine the size of the FIB/kernel >> routing table. OpenBGPd does not give me this data, and on my >> duallie-Xeon 2.8s, it takes quite a while to use netstat & wc to count. >> >> I'm not looking for exact numbers, just something I can poll via NetSNMP >> and plot in cacti... >> >> I looked though netstat, route, sysctl, vmstat, even pored over an >> snmpwalk... can't find anything. >> Been asking around, and the only suggestion I've received was to write a >> daemon that dumps the table and then monitors the changes, but I'm not a >> programmer, nor could I find any tool in ports that might assist in >> this. >> >> I'd be happy with almost any metric that gives me some absolute >> reference as to how big my routing table is so I can get some nice >> pretty graphs done up. Not pounding the system every 60-300 seconds >> would be very nice. >> >> Any suggestions? Or does everyone just pipe netstat? Is there a MIB for >> sysctl or NetSNMP I'm missing? >> > > no. It's a hard thing to do so that is why it hasn't been done yet. Perhaps I misunderstand his question but trouble% vmstat -m |grep routetbl routetbl 14 2K - 33875 16,32,64,128,256 should show memory allocated to the routing table. Sam