From owner-freebsd-hackers Fri Mar 1 21:22:19 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from saruman.xwin.net (saruman.xwin.net [205.219.158.250]) by hub.freebsd.org (Postfix) with ESMTP id 5A81F37B417 for ; Fri, 1 Mar 2002 21:22:15 -0800 (PST) Received: from localhost (dp@localhost) by saruman.xwin.net (8.11.4/8.11.4) with ESMTP id g225NEa01413; Fri, 1 Mar 2002 23:23:14 -0600 Date: Fri, 1 Mar 2002 23:23:14 -0600 (CST) From: Paul Halliday X-X-Sender: To: Joe Abley Cc: Dan Nelson , "Daniel O'Connor" , Danny Braniss , Patrick Thomas , Subject: Re: how do I see the current number of PTYs in use ? In-Reply-To: <20020302000410.A45042@buffoon.automagic.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 2 Mar 2002, Joe Abley wrote: > On Fri, Mar 01, 2002 at 09:51:22PM -0600, Paul Halliday wrote: > > On Fri, 1 Mar 2002, Joe Abley wrote: > > > > > > > > On Friday, March 1, 2002, at 05:49 , Dan Nelson wrote: > > > > > > > In the last episode (Mar 02), Daniel O'Connor said: > > > >> On Fri, 2002-03-01 at 21:19, Danny Braniss wrote: > > > >>> fstat | awk '{print $8}' | egrep 'tty[pqrsPQRS]' | sort -u | wc -l > > > >>> > > > >>> is IMHO correct, ;-) > > > >> > > > >> Ach, of course :) > > > >> I hope the original poster is satisfied 8-) > > > > > > > > Easier might be "pstat -t | grep 'tty[pqrsPQRS]' | wc -l" > > > > > > pstat -t | grep -ic 'tty[pqrs]' > > > > > > saves a fork. Since we're being silly. > > > > err.. we are not being silly.. > > Oh yes we are. > > > not accurate (read last post) > > your modification still produces erroneous results. > > My modification saves a fork from your modification, as specified. > If there is a god, this thread will now die. Your not very bright are you? for one, there is no god. Secondly you failed to see what I introduced into the equation in the mod.. now pay attention Mr. not walking erectus... this was the line in question: [00:12am]-root@dissent~# pstat -t | grep 'tty[pqrsPQRS]' | wc -l 10 my addition: [00:12am]-root@dissent~# pstat -t | grep 'tty[pqrsPQRS]' | grep OCc | wc -l 3 your solution: [00:17am]-root@dissent~# pstat -t | grep -ic 'tty[pqrs]' 10 And the winner for number of terminals 'actually' open? definately not yours Mr. save a fork. Thanks for comming out though. Paul H. "Don't underestimate the power of stupid people in large groups" ___________________ http://dp.penix.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message