Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 2000 18:26:25 +0800 (CST)
From:      wkwu@Kavalan.csie.NCTU.edu.tw
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/20799: top's problem
Message-ID:  <200008231026.SAA10196@Kavalan.csie.NCTU.edu.tw>

next in thread | raw e-mail | index | archive | help

>Number:         20799
>Category:       bin
>Synopsis:       top's problem
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 23 03:30:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Wei-Kai Wu
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Kavalan
>Environment:

Nothing about the Environment.

>Description:

We use yp for about 2000 users. Inside the 'top' source, 
/usr/src/usr.bin/top/machine.c: line 238:

    while ((pw = getpwent()) != NULL) {
        if (strlen(pw->pw_name) > namelength)
            namelength = strlen(pw->pw_name);
    }
    if (namelength < 8)
        namelength = 8;
    if (namelength > 15)
        namelength = 15; 

we have to comment above, and added only line:
	namelength = 9;

Because the 'top' command will delay about 7-seconds if we use
the original source. I am wondered why the 'top' dump all yp-passwd
to get 'namelength'. It seems a little stupid.

>How-To-Repeat:

>Fix:

comment above, and added only line: (Maybe you have beeter idea:)
        namelength = 9;

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008231026.SAA10196>