Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jan 2008 12:15:25 -0500
From:      "David Frascone" <dave@frascone.com>
To:        freebsd-current@freebsd.org
Subject:   Small patch to fix top in large NIS environments
Message-ID:  <9cf5ced20801090915i3df2d4a1lc057a38b20fc5ac2@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
------=_Part_33095_22656966.1199898925564
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

The -u flag to top is supposed to limit uid lookups.  But, it was still
spinning through the entire password database with while (getpwent()).  At
Cisco, which has a fairly large NIS database, this takes forever, and top
never starts.

I filed this bug to address it:
http://www.freebsd.org/cgi/query-pr.cgi?pr=119490

The attached patch fixes it.  This is my first submission, so let me know if
this is the proper order, etc, to post the patches (i.e. file the bug, the
post a fix)

-Dave

------=_Part_33095_22656966.1199898925564
Content-Type: text/plain; name=patch.txt
Content-Transfer-Encoding: base64
X-Attachment-Id: f_fb84tib80
Content-Disposition: attachment; filename=patch.txt

SW5kZXg6IHVzci5iaW4vdG9wL21hY2hpbmUuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvdXNyL0Zy
ZWVCU0QvY3ZzdXAvc3JjL3Vzci5iaW4vdG9wL21hY2hpbmUuYyx2CnJldHJpZXZpbmcgcmV2aXNp
b24gMS44MwpkaWZmIC1yMS44MyBtYWNoaW5lLmMKMjI2YzIyNgo8IG1hY2hpbmVfaW5pdChzdHJ1
Y3Qgc3RhdGljcyAqc3RhdGljcykKLS0tCj4gbWFjaGluZV9pbml0KHN0cnVjdCBzdGF0aWNzICpz
dGF0aWNzLCBjaGFyIGRvX3VuYW1lcykKMjQwYzI0MCwyNDEKPCAJd2hpbGUgKChwdyA9IGdldHB3
ZW50KCkpICE9IE5VTEwpIHsKLS0tCj4gCWlmIChkb191bmFtZXMpIHsKPiAJICAgIHdoaWxlICgo
cHcgPSBnZXRwd2VudCgpKSAhPSBOVUxMKSB7CjI0MmEyNDQKPiAJICAgIH0KSW5kZXg6IGNvbnRy
aWIvdG9wL3RvcC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC91c3IvRnJlZUJTRC9jdnN1cC9zcmMv
Y29udHJpYi90b3AvdG9wLmMsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMjMKZGlmZiAtcjEuMjMg
dG9wLmMKNDUzYzQ1Mwo8ICAgICBpZiAobWFjaGluZV9pbml0KCZzdGF0aWNzKSA9PSAtMSkKLS0t
Cj4gICAgIGlmIChtYWNoaW5lX2luaXQoJnN0YXRpY3MsIGRvX3VuYW1lcykgPT0gLTEpCg==
------=_Part_33095_22656966.1199898925564--



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