From owner-freebsd-security Mon Nov 27 13:27:49 2000 Delivered-To: freebsd-security@freebsd.org Received: from nova.fnal.gov (nova.fnal.gov [131.225.18.207]) by hub.freebsd.org (Postfix) with ESMTP id 08AA237B479 for ; Mon, 27 Nov 2000 13:27:44 -0800 (PST) Received: from localhost (tez@localhost) by nova.fnal.gov (8.9.3+Sun/8.9.1) with ESMTP id PAA20389 for ; Mon, 27 Nov 2000 15:27:42 -0600 (CST) X-Authentication-Warning: nova.fnal.gov: tez owned process doing -bs Date: Mon, 27 Nov 2000 15:27:42 -0600 (CST) From: Tim Zingelman X-Sender: To: Subject: Re: fics In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 27 Nov 2000, Tim Zingelman wrote: > sockstat|grep "\*\.[0-9 ]*\*\.\*"|cut -c10-18,39-45|sort -n -u +1 Oops, you caught me... I built this on a 3.x system... it doesn't work on a 4.2 system. Sockstat output now uses : not . to separate ip & port. Also, it looks like sort -u weeds out duplicate keys, not duplicate rows as I'd assumed :( I'm starting to think this is too complex a solution... but: sockstat|grep "\*.[0-9 ]*\*.\*"|cut -c1-9,10-18,39-45|sort -u|sort -n +2 seems to do what I want both on 3.x and 4.x systems. If people think this is ok, I'd be glad to submit patches... - Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message