From owner-freebsd-questions@FreeBSD.ORG Sat May 24 12:51:38 2008 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 C6D9B1065683 for ; Sat, 24 May 2008 12:51:38 +0000 (UTC) (envelope-from lev@nupfel.de) Received: from schatten.darksystem.net (schatten.darksystem.net [88.198.51.7]) by mx1.freebsd.org (Postfix) with ESMTP id 504C98FC41 for ; Sat, 24 May 2008 12:51:37 +0000 (UTC) (envelope-from lev@nupfel.de) Received: from schatten.darksystem.net (localhost [127.0.0.1]) by schatten.darksystem.net (Postfix) with ESMTP id DECBC727EEA; Sat, 24 May 2008 14:51:35 +0200 (CEST) X-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC X-Spam-Check-By: schatten.darksystem.net Received: from port-212-202-192-115.dynamic.qsc.de (HELO mail.nupfel.de) (212.202.192.115) (smtp-auth username lev, mechanism plain) by schatten.darksystem.net (qpsmtpd/0.40) with (AES256-SHA encrypted) ESMTPSA; Sat, 24 May 2008 14:51:17 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.nupfel.de (Postfix) with ESMTP id 80FDB1A214CF; Sat, 24 May 2008 14:51:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at nupfel.de Received: from mail.nupfel.de ([127.0.0.1]) by localhost (mail.nupfel.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ik4z+lTfOIHk; Sat, 24 May 2008 14:51:09 +0200 (CEST) Received: from lain (lain.navi.wired [192.168.0.40]) by mail.nupfel.de (Postfix) with ESMTP id 670231A214CC; Sat, 24 May 2008 14:51:09 +0200 (CEST) Date: Sat, 24 May 2008 14:51:05 +0200 From: Tobias Kirschstein To: beni@brinckman.info Message-ID: <20080524145105.3f2fd1f6@lain> In-Reply-To: <200804281800.46883.beni@brinckman.info> References: <20080424181040.GB14991@nupfel.de> <200804281800.46883.beni@brinckman.info> Organization: NIC.BLA X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.8; amd64-portbld-freebsd8.0) X-Face: "\j?x](l|]4p?-1Bf@!wN<&p=$.}^k-HgL}cJKbQZ3r#Ar]\%U(#6}'?<3s7%(%(gxJxxcR nSNPNr*/^~StawWU9KDJ-CT0k$f#@t2^K&BS_f|?ZV/.7Q Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: simple network traffic query tool 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, 24 May 2008 12:51:38 -0000 On Mon, 28 Apr 2008 18:00:46 +0000 beni wrote: > On Thursday 24 April 2008 18:10:40 Tobias Kirschstein wrote: > > hi, > > > > i'm looking for a small tool to query the current network traffic > > (kb IN and OUT) per interface. is there any sysctl or tool which > > gives me a similar output to "systat -ifstat": > > > > /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10 > > Load Average |||| > > > > Interface Traffic Peak > > Total lo0 in 0.000 KB/s 0.000 KB/s 226.079 > > KB out 0.000 KB/s 0.000 KB/s 226.079 KB > > > > wpi0 in 0.000 KB/s 0.000 KB/s > > 164.577 MB out 0.000 KB/s 0.000 KB/s 6.205 > > MB > > > > the background: > > unfortunately the network monitor build into superkaramba does not > > work for freebsd, os i want to write a widget which uses sysctl or > > any other tool if available got get this information. systat is not > > appropriate to be used because it does not terminate on its own as > > i see. > > I'm using a modified version of Superkarambas CompactMonitor. It is > written for Linux I think, but easily adaptable for freebsd. > All I did was moddify the > ~/.kde/share/apps/superkaramba/themes/CompactMonitor/CompactMonitor.theme > file : > > text x=435 y=50 sensor=network device="vr0" format="%in KB/s" > decimals=1 text x=370 y=50 value="Download" > text x=570 y=50 sensor=program program="netstat -ibh | grep Link#1 > | awk '{print $7}'" align=right interval=1000 > > text x=435 y=65 sensor=network device="vr0" format="%out KB/s" > decimals=1 text x=370 y=65 value="Upload" > text x=570 y=65 sensor=program program="netstat -ibh | grep Link#1 | > awk '{print $10}'" align=right interval=1000 > > Add > graph x=370 y=30 sensor=network device="vr0" format="%out" w=200 > h=15 color=255,127,127 interval=1000 max=100 > graph x=370 y=30 sensor=network device="vr0" format="%in" w=200 > h=15 color=127,230,180 interval=1000 max=100 > if you want to add a graphic representation and change the "vr0" > according to your (ethernet) device. > > It works for me with kde 3.5.8 on 7.0-stable. thanks a lot! i missed the device=vr0 part in my config... sometimes it can be so simple ;) -- ciao, lev