From owner-freebsd-current Fri Jan 22 20:44:31 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA12051 for freebsd-current-outgoing; Fri, 22 Jan 1999 20:44:31 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA12046 for ; Fri, 22 Jan 1999 20:44:29 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id UAA58355; Fri, 22 Jan 1999 20:44:17 -0800 (PST) (envelope-from dillon) Date: Fri, 22 Jan 1999 20:44:17 -0800 (PST) From: Matthew Dillon Message-Id: <199901230444.UAA58355@apollo.backplane.com> To: Andrzej Bialecki Cc: current@FreeBSD.ORG Subject: Re: kvm_getswapinfo() function added to libkvm. top, pstat, systat updated References: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :On Fri, 22 Jan 1999, Matthew Dillon wrote: : :> A new function, kvm_getswapinfo(), has been added to libkvm. :> :> pstat, systat, and top have been updated to use the new function. : :Have you considered using sysctl(3) for this instead? If yes, could you :explain why the libkvm seemed better to you? That's easy. Look how much code kvm_getswapinfo() is and tell me that you want to waste that memory in the kernel. :(I'm asking because with libkvm you need to use /dev/kmem _and_ you need :to access symbol table - this doesn't work with stripped kernels). : :Andrzej Bialecki You can boot with a stripped kernel and then point the system's notion of the kernel binary to a non-stripped version. That doesn't handle permissions, but getting deep-down swap information is not something any standard utility ever needs to do. It isn't something like getting the load average, which utilities may legitimately need. For that reason, I see no problem leaving kvm_getswapinfo() in libkvm. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message