-1

'who -a' returns a bunch of mystery log-ins. Apparently empty pts/# are logged out users, but active processes are assigned to the so-called terminated users.

           run-level 5  2019-06-13 19:14
LOGIN      tty2         2019-07-13 07:21             13232 id=tty2
LOGIN      console      2019-06-13 19:14               419 id=cons
           pts/0        2019-07-13 07:36             13592 id=ts/0  term=0 exit=0
           pts/1        2019-07-13 07:51             14072 id=ts/1  term=0 exit=0
           pts/2        2019-07-13 01:11              4344 id=ts/2  term=0 exit=0
           pts/3        2019-07-13 07:37             13700 id=ts/3  term=0 exit=0
user + pts/4        2019-07-13 19:48 01:15       14097 (xxx.xxx.x.xxx via mosh [xxxxx])
user + pts/5        2019-07-13 20:26   .         30505 (xxx.xxx.x.xxx)

How can pts/0 to pts/4 and tty2 be kicked out, plus and is run-level 5?

1

1 Answer 1

2

You are NOT seeing any users there and there is nobody to be ”kicked out”

By default who -a also shows -d ; dead processes.

Terminals that closed down and the exit code of the process that was running there and stopped/died.

5
  • Ok, how come pts/2 was running a process that was started by user pts/4? I had that problem earlier and thought that it was weird because pts/2 had been terminated. Nothing to worry about?
    – n - s - m
    Jul 15, 2019 at 9:03
  • who -d parses the login record from utmp and wtmp and finds entries marked as DEAD_PROCESS and displays them. That is hardly ever useful. -DEAD_PROCESS records do not contain a user name anymore, that gets cleared man 5 wtmp: "When init(1) finds that a process has exited, it locates its utmp entry by ` ut_pid, sets ut_type` to DEAD_PROCESS, and clears ut_user, ut_host and ut_time with null bytes."
    – HBruijn
    Jul 15, 2019 at 11:16
  • ID's get recycled and no particular meaning should be assigned to the id's of virtual consoles.
    – HBruijn
    Jul 15, 2019 at 11:18
  • ok, I hope there is nothing to worry about, because a python job was assigned to a dead login session, and after closing it and trying to run it again, it could not run because it said the job was still active. That is when I discovered it was automatically assigned to a dead login without any knowledge about it. Very strange.
    – n - s - m
    Jul 17, 2019 at 17:52
  • Does anyone know why a stopped process is being overtaken by a dead login? when trying to run it again it is no possible due to it already being 'active'
    – n - s - m
    Jul 19, 2019 at 16:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .