Date: Fri, 22 Jan 1999 20:44:17 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Andrzej Bialecki <abial@nask.pl> Cc: current@FreeBSD.ORG Subject: Re: kvm_getswapinfo() function added to libkvm. top, pstat, systat updated Message-ID: <199901230444.UAA58355@apollo.backplane.com> References: <Pine.BSF.4.02A.9901230132160.24442-100000@korin.warman.org.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
: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 <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901230444.UAA58355>