From owner-freebsd-current Sat Jul 5 10:27:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA11879 for current-outgoing; Sat, 5 Jul 1997 10:27:52 -0700 (PDT) Received: from labs.usn.blaze.net.au (labs.usn.blaze.net.au [203.17.53.30]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA11874 for ; Sat, 5 Jul 1997 10:27:48 -0700 (PDT) Received: from labs.usn.blaze.net.au (local [127.0.0.1]) by labs.usn.blaze.net.au (8.8.5/8.8.5) with ESMTP id DAA03838; Sun, 6 Jul 1997 03:27:31 +1000 (EST) Message-Id: <199707051727.DAA03838@labs.usn.blaze.net.au> X-Mailer: exmh version 2.0gamma 1/27/96 To: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= cc: Wolfram Schneider , current@FreeBSD.ORG Subject: Re: long usernames in top In-reply-to: Your message of "Sat, 05 Jul 1997 16:16:38 +0400." X-Face: (W@z~5kg?"+5?!2kHP)+l369.~a@oTl^8l87|/s8"EH?Uk~P#N+Ec~Z&@;'LL!;3?y Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 06 Jul 1997 03:27:28 +1000 From: David Nugent Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Use this to determine the maximum name. 8 is an obvious minimum, and > > do this at startup. If larger names are added while top is running, > > well, tough, they get truncated which is no big deal. > > Better variant will be to calculate maxnamelen at runtime through > displayed names only, not through all names from /etc/passwd Very true. Does top use pwcache? (I guess not since top is written for os's that don't have it, but you never know :)). > Otherwise you'll get wide output even if only one long user name present > in your /etc/passwd (even this userid is never really used). Yes. Regards, David -- David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freebsd.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/