From: Terje Eggestad <terje.eggestad@scali.no>
To: Nicholas Berry <nikberry@med.umich.edu>
Cc: amon@vnl.com, weixl@caltech.edu,
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 14:44:14 +0100 [thread overview]
Message-ID: <1005054258.1221.122.camel@pc-16.office.scali.no> (raw)
In-Reply-To: <sbe793a0.090@mail-01.med.umich.edu>
In-Reply-To: <sbe793a0.090@mail-01.med.umich.edu>
Absolutly true.
You can get a 90% solution by testing for tty and for proces that has a
connection to a tcp port between 6000 and 6100 somewhere or has a unix
socket to /tmp/.X11-unix/X0 (or whereever X chooses to place the unix
socket).
But thats definitly not good enough to base your scheduling on.
TJ
tir, 2001-11-06 kl. 13:38 skrev Nicholas Berry:
It depends whether you're looking for an idea of who's on, or you want a definitive count. The lattter is basically almost impossible. What if a logged-in user nohups two xterms to different X-servers, then logs out - how many people are logged in? I've spent a hell of a long time working on this on AIX for a certain German bank, and the bottom line is that it can't be done. What is 'logged on' anyway? Someone running bash or ksh, that's cool, but what about someone running /home/fred/myprog? Is it a shell?
Basically once Unix went beyond serial terminals connected to dumb serial ports, we lost the ability to track users.
Nik
> Hmmm, you should be able to count the number of pty's and tty's.
> Every logged in user is attached to some sort of getty
> whose parent is the init task (1). That might be a basis for
> a count.
--
_________________________________________________________________________
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
_________________________________________________________________________
next parent reply other threads:[~2001-11-06 13:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <sbe793a0.090@mail-01.med.umich.edu>
2001-11-06 13:44 ` Terje Eggestad [this message]
2001-11-06 14:40 ` Richard B. Johnson
2001-11-06 14:21 Telford002
-- strict thread matches above, loose matches on Subject: below --
2001-11-06 12:38 Nicholas Berry
2001-11-04 22:15 Wei Xiaoliang
2001-11-05 7:47 ` Riley Williams
2001-11-06 1:20 ` Chris Abbey
2001-11-06 9:28 ` Terje Eggestad
2001-11-06 12:03 ` Dale Amon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1005054258.1221.122.camel@pc-16.office.scali.no \
--to=terje.eggestad@scali.no \
--cc=amon@vnl.com \
--cc=mlist-linux-kernel@nntp-server.caltech.edu \
--cc=nikberry@med.umich.edu \
--cc=weixl@caltech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®