Subject: Bug#3880: procps w command problems ...

From: "Peter Tobias" <[email-masked]>
Date: Tue, 23 Jul 1996 00:14:13 +0200 (MET DST)

Package: procps
Version: 1.01a-1

I just tried the new proc-ps package and noticed a few small problems
with the "w" command (w-new is from procps-1.01, w-old is from procps-0.99).

# w-new
  4:49pm  up 1 day,  5:14,  6 users,  load average: 0.99, 0.94, 0.78
USER     TTY      FROM              LOGIN@  IDLE   JCPU   PCPU  WHAT
tobias   tty1                      11:37am 20:33  11.15s 11.15s  -bash
tobias   tty2                      11:37am  6:04m  3.86s  3.86s  -bash
tobias   tty3                      11:37am  5:53m  1.04s  1.04s                                 bashtobias   tty4                      11:37am  5:46m  1.29s  1.29s  -bash
tobias   tty5                       9:08pm  0.00s  6.64s  0.10s  ./w
tobias   tty6                      11:55am  2:56m 12.65s  7.26s  mc

# w-old
  4:49pm  up 1 day,  5:14,  6 users,  load average: 0.99, 0.94, 0.78
User     tty       login@  idle   JCPU   PCPU  what
tobias   tty1     Sat11am    20     11     11  -bash
tobias   tty2     Sat11am  6:04      3      3  -bash
tobias   tty3     Sat11am  5:53      1      1  bash
tobias   tty4     Sat11am  5:47      1      1  -bash
tobias   tty5     Sat 9pm            6         -
tobias   tty6     Sat11am  2:56     12         -

The problems I see are:
- w-new only reports the login time, even when the person logged
  in more than 24 hours ago (it should report the same as w-old)
- w-new reports the "what" entry on tty3 not at the correct
  position (there are more than 30 characters between the position
  where the "what" entry should be and where it actually is).
  BTW: I'm using a 100x40 display and ps shows the bash on tty3
  as "(bash)".
- w-new reports "./w" as the command the user on tty5 executed.
  This is correct but w-new should never ever show that. It should
  only print a "-" and not the command (the user "tobias" su'ed to
  "root" on tty5). w-old shows the correct commands for tty5 and
  tty6 (both "su root" sessions).
- IMHO w-new should use the old format for IDLE/JCPU/PCPU. Using
  more accurate numbers results in a very full and complex looking
  IDLE/JCPU/PCPU area. The more accurate values could be shown when
  the user uses a command line option (maybe -p ?). BTW: even with
  the more accurate values the IDLE times are incorrect (20:33
  should be 20:33m, 6:04m should be 6:04h and so on)
- w-new shouldn't report the "FROM" field by default. Most people
  use linux in a non-networked environment and most distributions
  have the "FROM" field disabled by default (they use -f to show
  it).

Thanks,

Peter

-- 
 Peter Tobias                                EMail:
 Fachhochschule Ostfriesland                 [email-masked]
 Fachbereich Elektrotechnik und Informatik   [email-masked]
 Constantiaplatz 4, 26723 Emden, Germany     [email-masked]

---

From: Helmut Geyer <[email-masked]>
Date: Tue, 23 Jul 1996 20:45:42 +0200 (MET DST)

>   have the "FROM" field disabled by default (they use -f to show
Thank you for your report. I will investigate the issues 1, 2 and 3 
I will change the default for reporting the FROM field.

Nevertheless I really like the new IDLE/JCPU/PCPU format much better
than the old format. The problem with the units is noted and 
I will talk with the upstream maintainer about it.

	Helmut

------------------------------------------------------------------------------
Helmut Geyer                                [email-masked]