From: "Nicholas Berry" <nikberry@med.umich.edu>
To: <terje.eggestad@scali.no>, <amon@vnl.com>
Cc: <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: Tue, 06 Nov 2001 07:38:49 -0500 [thread overview]
Message-ID: <sbe793a0.089@mail-01.med.umich.edu> (raw)
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.
next reply other threads:[~2001-11-06 12:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-06 12:38 Nicholas Berry [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-11-06 14:21 How can I know the number of current users in the system? Telford002
[not found] <sbe793a0.090@mail-01.med.umich.edu>
2001-11-06 13:44 ` Terje Eggestad
2001-11-06 14:40 ` Richard B. Johnson
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=sbe793a0.089@mail-01.med.umich.edu \
--to=nikberry@med.umich.edu \
--cc=amon@vnl.com \
--cc=mlist-linux-kernel@nntp-server.caltech.edu \
--cc=terje.eggestad@scali.no \
--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