From owner-freebsd-hackers Fri Mar 1 1: 2: 6 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id A8B9237B405 for ; Fri, 1 Mar 2002 01:01:55 -0800 (PST) Received: from localhost (root@localhost [127.0.0.1]) by cain.gsoft.com.au (8.12.2/8.12.2) with ESMTP id g2191oZR078619; Fri, 1 Mar 2002 19:31:51 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Subject: Re: how do I see the current number of PTYs in use ? From: "Daniel O'Connor" To: Paul Halliday Cc: Patrick Thomas , freebsd-hackers@FreeBSD.ORG In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 01 Mar 2002 20:31:49 +1130 Message-Id: <1014973312.18005.22.camel@chowder.gsoft.com.au> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) 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 Fri, 2002-03-01 at 19:51, Paul Halliday wrote: > On Thu, 28 Feb 2002, Patrick Thomas wrote: > > > > > (asked on -questions and got no response, also did a `sysctl -a | grep > > pty` and only saw error messages) > > > > I am trying to troubleshoot something - the bad thing that is happening is > > that I try to create new `screen` windows and I get 'No more PTYs'. I > > know how to add more PTYs, etc., and I am not asking how to do that - I am > > simply asking: > > > > How do I, when I am told I have no more PTYs, know whether I just hit 32 > > out of 32, or 128 out of 128, or what ? I want to know how many PTYs I > > have available, and how many are in use. > > > > How do I do that ? > > ls /dev | grep pty | wc -l > who | awk '{print $2}' | grep p | wc -l > > ;P This -> fstat | awk '{print $8}' | egrep 'tty[pqrsPQRS]' | wc -l Is much more accurate. (ie on my machine who only shows 4 entries :) --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message