From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 21 14:47:06 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFE9B106564A for ; Wed, 21 Apr 2010 14:47:06 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id C46A28FC27 for ; Wed, 21 Apr 2010 14:47:06 +0000 (UTC) Received: by pvd12 with SMTP id 12so603867pvd.13 for ; Wed, 21 Apr 2010 07:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=DGjyIFOAhcK/6dkQI7S80kF7jvqqR6uAlaZt0b7nOjM=; b=WsbzcN7r2LGThLTrAZgird2kbJaJGopzgKo/76sgcwlZ0QBbQo03WZ96DCJq4lqikc zdaSkTdi8VgrVDlGjXzsz+gms4vUPAwc3lbYH5OSBrhJjqXd+fCgnHJas9vIvx7HBwua D2jzidSTNMHo3KI426yGCAgv7AVpQDOpop6tE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=uwM8x9U5FCVbkaub9MSEffkG6o2Ybyoly3GNXQKadUmI7d+YEpm6JDl+VJioM4MMAH jeXiiK1qSY3QrzuKKet5EAHnLXNgHOs+maRqmgPQWFUzWShirwBivxlCuCNVaWHYA98V YhzRQJYI8+xmkTqUI6974QR4maUq/GklGM58g= MIME-Version: 1.0 Received: by 10.231.113.36 with HTTP; Wed, 21 Apr 2010 07:47:04 -0700 (PDT) In-Reply-To: <20100421130101.1d9511f1@amnesiac.pht> References: <20100421130101.1d9511f1@amnesiac.pht> Date: Wed, 21 Apr 2010 09:47:04 -0500 Received: by 10.141.100.16 with SMTP id c16mr7625262rvm.29.1271861224215; Wed, 21 Apr 2010 07:47:04 -0700 (PDT) Message-ID: From: Brandon Gooch To: Dmitry Banschikov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: netstat count option X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2010 14:47:07 -0000 On Wed, Apr 21, 2010 at 4:01 AM, Dmitry Banschikov wr= ote: > Hello, > > I wrote small patch to the netstat utility. > The patch allows to specify how many times, the display output should be = continue, > in case of option -w. > Usage: > # ./netstat -w2 -c2 > =A0 =A0 =A0 =A0 =A0 =A0input =A0 =A0 =A0 =A0(Total) =A0 =A0 =A0 =A0 =A0 o= utput > =A0 packets =A0errs =A0 =A0 =A0bytes =A0 =A0packets =A0errs =A0 =A0 =A0by= tes colls > =A0 =A0 =A0 =A015 =A0 =A0 0 =A0 =A0 =A0 2268 =A0 =A0 =A0 =A0 13 =A0 =A0 0= =A0 =A0 =A0 1190 =A0 =A0 0 > =A0 =A0 =A0 =A0 4 =A0 =A0 0 =A0 =A0 =A0 =A0240 =A0 =A0 =A0 =A0 =A05 =A0 = =A0 0 =A0 =A0 =A0 =A0278 =A0 =A0 0 > # > > Option -c [count] is simillar to the same option in iostat utility. > In linux -c means continious output: > =A0 -c, --continuous > =A0 =A0 =A0 This will cause netstat to print the selected information eve= ry second continuously. This seems pretty useful, perhaps you should file a PR? http://www.freebsd.org/send-pr.html -Brandon