[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Only slightly concerned about that extra user on my
>
> lesleyb :0 console 10:42 ?xdm? 36.66s 0.12s -:0
> lesleyb pts/0 - 10:42 5:52 0.00s 0.49s kdeinit:
> kded
> lesleyb pts/1 - 10:43 0.00s 18.91s 0.00s w -f
>
>
> (with line wrap on the 2nd line ) using KDE window manager with
> thunderbird and a console screen open.
>
> I've just booted up after being away and gkrellm currently reports 3
> users. I've still got root, nobody, lp and postfix listed in a 'ps -ef'.
And you have three users logged in: three lesleyb on seperate terminals, so
gkrellm is reporting the right value.
You will generally have processes running as root, nobody and lp though - as
various services and daemons have their own jobs to do. These aren't
actually logins, only running processes. Ditto for postfix (which you won't
generally see unless you've got the postfix mail daemon installed on your
system).
>
>
> 'w -f' results after opening a second console :
>
> 10:53:16 up 13 min, 4 users, load average: 0.38, 0.81, 1.05
> USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
> lesleyb :0 console 10:42 ?xdm? 54.56s 0.12s -:0
> lesleyb pts/0 - 10:42 10:47 0.00s 0.50s kdeinit:
> kded
> lesleyb pts/1 - 10:43 44.00s 27.16s 0.05s /bin/bash
> lesleyb pts/4 - 10:53 0.00s 0.04s 0.00s w -f
>
> and gkrellm shows 4 users.
>
Which is still correct ;)
> My guess is a mix of how gkrellm counts users and whatever SuSE/KDE does
> to open a console.
Ish. Each console that is opened writes a record to the file utmp (which
lives somewhere under /var). utmp is used by who, w, and (by infernce)
gkrellm, and contains a record of all users currently logged in. A 'user'
is not an instance of a username, but of an active session on a terminal
(i.e., pts/0, console etc...)
Postfix, lpd, apache, and any other daemon generally do not hold a terminal
open, so they will never be counted as logged in users. You'll just see
the processes running in a 'ps -e'.
It is possible to opern xterms without writing to utmp, but this isn't
particularly useful IMO, and means users can log in and remain hidden without
digging through a 'ps' output.
In short, gkrellm is listing logged in users (that is, the number of active
terminal sessions), and is behaving as required :-)
Chris...
--
\ Chris Johnson \
\ cej [at] nightwolf.org.uk ~-----,
\ http://cej.nightwolf.org.uk/ ~-----------------------------------,
\ Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \____
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.