All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Fwd: How can I know the number of current users in the system?]
@ 2001-11-07  3:55 Art Wagner
  0 siblings, 0 replies; only message in thread
From: Art Wagner @ 2001-11-07  3:55 UTC (permalink / raw
  To: mlist-linux-kernel

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

Many messages originating at;
mlist-linux-kernel@NNTP-SERVER.CALTECH.EDU
are being auto-posted to "linux-kernel@vger.kernel.org". Can you please do
what you can to get linux-kernel removed from the subscriber list
for that (mlist-linux-kernel) mailing list....
Thank you,
Art Wagner


[-- Attachment #2: Re: How can I know the number of current users in the system?.eml --]
[-- Type: message/rfc822, Size: 5082 bytes --]

From: Terje Eggestad <terje.eggestad@scali.no>
To: weixl@caltech.edu
Cc: mlist-linux-kernel@NNTP-SERVER.CALTECH.EDU
Subject: Re: How can I know the number of current users in the system?
Date: 06 Nov 2001 10:28:57 +0100
Message-ID: <1005038940.2134.27.camel@pc-16.office.scali.no>

The short answer is; No.

The slightly longer answer is that Linux/Unix kernels don't have a
consept of a logged in user. userids are used for really only one thing,
owner ship of data. In order to do enforce it a process must be running
as a spesific user. Once programs had a userid attached to it, things
rolled on from there. However there is no way of figuring out if a
process is "online" or something else.

However, the big iron *ix'es do this, and I can't remember exactly how
they do it. But another feature often pop up; guaranteeing a users a
minimum CPU percentage. (Even if I hate it, it has merit for RT/responce
critical apps.)

My suggestion is to loop thru the processes and collect a list of all
the userids and form a tree/list of all the processes belonging to each
of them. Then you fair share schedule between the users.

Another issue: did you want to serialize scheduling? (run all the
processes for a user in sequence before starting on the next user?)
Another feature on the "big" *ix'es. 

THis is going to have some side effects! nicing a process up or down may
only nice relative to the users other processes, not other users. It may
be what you want, just thought I'd bring it up. 

Next issue, do you want to fair share between root and the other users?
(and THAT is a time old discussion...)

TJ


søn, 2001-11-04 kl. 23:15 skrev Wei Xiaoliang:
> Hi every one,
>     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?
> 
>     If no, where can I put the inc instruct and dec instruct  or the
> counter? in the uid_hash_insert and uid_hash_remove?
>     Thank you!
> -----------------------------------------------------------------------
> Xiaoliang (David) Wei                    Graduate Student in CS, Caltech
> E-mail: weixl@caltech.edu                Office: 158 Jorgensen
> Phone: 1-(626)-395-3555 (O)        1-(626)-577-5238 (H)
> Mail:     Xiaoliang Wei, 256-80 Caltech, Pasadena, CA 91125, U.S.A.
> WWW: http://www.cs.caltech.edu/~weixl    http://166.111.69.241/~wxl
> -----------------------------------------------------------------------
> -
> 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/
-- 
_________________________________________________________________________

Terje Eggestad                  terje.eggestad@scali.no
Scali Scalable Linux Systems    http://www.scali.com

Olaf Helsets Vei 6              tel:    +47 22 62 89 61 (OFFICE)
P.O.Box 70 Bogerud                      +47 975 31 574  (MOBILE)
N-0621 Oslo                     fax:    +47 22 62 89 51
NORWAY            
_________________________________________________________________________

-
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/




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-11-07  4:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-07  3:55 [Fwd: How can I know the number of current users in the system?] Art Wagner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.