From owner-freebsd-hackers Sun Feb 3 23:17:53 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37]) by hub.freebsd.org (Postfix) with ESMTP id 510AA37B405 for ; Sun, 3 Feb 2002 23:17:51 -0800 (PST) Received: by starbug.ugh.net.au (Postfix, from userid 1000) id 1D614A809; Mon, 4 Feb 2002 18:17:49 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by starbug.ugh.net.au (Postfix) with ESMTP id 1BD085427; Mon, 4 Feb 2002 18:17:49 +1100 (EST) Date: Mon, 4 Feb 2002 18:17:49 +1100 (EST) From: Andrew To: Magdalinin Kirill Cc: freebsd-hackers@freebsd.org Subject: Re: how to count number of user process? In-Reply-To: Message-ID: <20020204181712.P53524-100000@starbug.ugh.net.au> X-WonK: *wibble* 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 Mon, 4 Feb 2002, Magdalinin Kirill wrote: > can anyone give an idea of C code on how to quickly count > the number of processes for a given user? I want to patch You could try kvm_getprocs with an argument of KERN_PROC_UID. Andrew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message