Re: trouble getting memory and swap info

看板DFBSD_kernel作者時間21年前 (2004/10/28 18:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串8/8 (看更多)
On Thu, 28 Oct 2004, Joerg Sonnenberger wrote: > On Thu, Oct 28, 2004 at 02:17:03AM +0200, Sten Spans wrote: >> On fbsd4 and probably dragonfly a program needs >> setgid kmem for certain memory statistics, which is >> why top works and gkrellm doesn't. > > If you have details to which statistics are only available via kmem > and not by sysctl, tell me. We can easily add sysctl handlers for them > and remove the setgid kmem requirement from top and other such tools. > I don't like the idea of userland reading kernel memory directly at all. The main bugbear is kvm_getswapinfo aka : kvm_getswapinfo(kd, swapary, 1, 0); data->swap_stats[0] = pagetob(swapary[0].ksw_total); data->swap_stats[1] = pagetob(swapary[0].ksw_used); data->swap_stats[2] = pagetob(swapary[0].ksw_total - swapary[0].ksw_used); ( this comes from my trivial tcp system statistics program, http://viewcvs.blinkenlights.nl/index.cgi/monitor/ ) -- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem
文章代碼(AID): #11WCDa00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #11WCDa00 (DFBSD_kernel)