Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 5 Nov 2001 13:09:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 5 Nov 2001 13:09:45 -0500 Received: from modem-4041.leopard.dialup.pol.co.uk ([217.135.159.201]:39949 "EHLO Mail.MemAlpha.cx") by vger.kernel.org with ESMTP id ; Mon, 5 Nov 2001 13:09:34 -0500 Posted-Date: Mon, 5 Nov 2001 07:47:30 GMT Date: Mon, 5 Nov 2001 07:47:29 +0000 (GMT) From: Riley Williams Reply-To: Riley Williams To: Wei Xiaoliang cc: Linux Kernel Subject: Re: How can I know the number of current users in the system? In-Reply-To: <3BE5BDFB.B49A8147@caltech.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi Wei. > I have a problem not clear: Is there any counter for the user number > in linux? > I want to do anexperiment which will get the number of current user > in the system and try fair-share scheduling based on it. I read the > sys.c and user.c but cannot find a counter for it. Is there any > counter for this things? Here's a simple shell command to provide that information: who | wc -l Try it and see... Best wishes from Riley. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/