w with devfs

Guillermo Pereyra Irujo gpirujo at mdq.com
Tue Oct 9 16:37:36 PDT 2001

> > > Since I use devfs I've lost the idle field of the w command:
> >
> > Works perfectly for me. I'm using devfs, too.
> >
> >   9:01pm  up 6 days,  4:29,  3 users,  load average: 0.27, 0.24, 0.31
> > USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
> > chris    pts/1    :0.0              9:01pm 17.00s  1.88s  1.86s  mutt
> > chris    pts/2    :0.0              9:01pm  0.00s  0.05s  0.02s  w
> > chris    pts/0    :0.0              8:46pm  6:40   0.15s  0.08s  bash
> works here too (devfs w/o devfsd)

You won't believe this, but I found it. Remember my previous w:

USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
gpirujo  /dev/vc/ -                 3:32pm  0.00s  0.21s  0.06s  fetchmail
root     /dev/vc/ -                 3:33pm  0.00s  0.16s  0.04s  w

See those /dev/vc/<empty>? See my new w now:

USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
root     vc/2     -                 8:26pm  0.00s  0.16s  0.04s  w
root     vc/3     -                 8:26pm  2:50   0.11s  0.11s  -bash

My change was in /etc/inittab, from:

c2:12345:respawn:/sbin/agetty /dev/vc/2 38400 linux


c2:12345:respawn:/sbin/agetty vc/2 38400 linux

I deduce that the field size in memory for the TTY field is the same as on
screen, and in the first case the tty of a user couldn't be guessed by w
and now it can. It wasn't devfs's fault, but w's.

Well... I'm done for myself. Thanks to all.

Should I now report this as a bug?

Guillermo Pereyra Irujo
Mar del Plata, Argentina

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message

More information about the blfs-support mailing list