From owner-freebsd-bugs Sat May 3 04:10:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA24911 for bugs-outgoing; Sat, 3 May 1997 04:10:12 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA24905; Sat, 3 May 1997 04:10:05 -0700 (PDT) Resent-Date: Sat, 3 May 1997 04:10:05 -0700 (PDT) Resent-Message-Id: <199705031110.EAA24905@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, andreas@klemm.gtn.com Received: from news1.gtn.com (news1.gtn.com [192.109.159.3]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA24789 for ; Sat, 3 May 1997 04:06:24 -0700 (PDT) Received: (from uucp@localhost) by news1.gtn.com (8.7.2/8.7.2) with UUCP id NAA26627 for FreeBSD-gnats-submit@freebsd.org; Sat, 3 May 1997 13:00:23 +0200 (MET DST) Received: (from andreas@localhost) by klemm.gtn.com (8.8.5/8.8.2) id MAA16098; Sat, 3 May 1997 12:48:16 +0200 (CEST) Message-Id: <199705031048.MAA16098@klemm.gtn.com> Date: Sat, 3 May 1997 12:48:16 +0200 (CEST) From: Andreas Klemm Reply-To: andreas@klemm.gtn.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/3477: top wastes 16 characters in USERNAME column Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 3477 >Category: bin >Synopsis: top wastes 16 characters in USERNAME column >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat May 3 04:10:02 PDT 1997 >Last-Modified: >Originator: Andreas Klemm >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: top was added to the OS in FreeBSD-current 3.0 >Description: Size of loginname was increased to 16 characters in FreeBSD-current. Top' display of the USERNAME field was statically increased to 16 columns wide output as well. Look here: PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND 241 andreas 2 0 6396K 10264K select1 2:26 0.34% 0.34% XF86_S 15462 andreas 2 0 372K 1212K select0 0:00 0.04% 0.04% rxvt 15380 andreas 18 0 748K 948K pause 0 0:00 0.00% 0.00% tcsh 5766 andreas 18 0 204K 848K pause 1 0:22 0.00% 0.00% ascloc 20 root 10 0 16488K 3308K mfsidl0 0:00 0.00% 0.00% mount_ In most cases you only watch USERNAMES with less characters. So top wastes much space that would badly be needed for the last COMMAND colunm, which now has only a size of 6. This causes, that even names of system binaries as mount_mfs are badly truncated. So you can't differentiate between mount_mfs and mount_nfs for example. >How-To-Repeat: >Fix: Some proposals to enhance the readability of tops output: 1) top should be made aware of display sizes > 80 columns and use the rest of space for the COMMAND output. When running under X11 in a xterm session it should recalculate the display size, when the xterm window has been resized. 2) Very nifty would be an additional command, that allows to toggle between two modes a) show as much from a COMMANDS commandline as possible b) show only as much from the command name (only the name) as possible. I'd suggest 'w' for "wide command display" like the w option in ps. 3) top should only use as much space for the USERNAME column as actually needed. I think it wouldn'd make sense, to bring too much dynamic in here. It should be sufficiant, to check the size for the USERNAME column at startup. 4) an additionally top command, to change the size during runtime. 'c' as "column size" of the USERNAME field. >Audit-Trail: >Unformatted: