Re: trouble getting memory and swap info

看板DFBSD_kernel作者時間21年前 (2004/10/28 03:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/8 (看更多)
On Wednesday 27 October 2004 21:46, Glenn Johnson wrote: > On Wed, 2004-10-27 at 12:23, Aggelos Economopoulos wrote: > > On Wednesday 27 October 2004 19:44, Glenn Johnson wrote: > > > I am trying to get gkrellm2 working on DragonFlyBSD. I got it to > > > compile and run but it does not report the memory or swap. Well, > > > actually, it does report them, its just that the values are 0. I used > > > the src/usr.bin/top/machine.c and the xsysinfo dfport as a guide. I am > > > not at my DragonFly system at the moment but basically what I did was > > > to set the vmmeter and vmstats structures as defined in vmmeter.h and > > > used in top/machine.c, using sysctlbyname to get the information. Is > > > there something else I need to do? > > > > Could you try the dfport override I posted on submit@ on 18/10 and let me > > know if it works (just dump it on /usr/dfports/sysutils and make > > install)? Not that I pay any attention to gkrellms memory meters (they > > suck) but it seems to agree with top on my machine. > > Thanks. Maybe I am misreading the patch but it looks like you are > getting swap info (total and used) from "/compat/linux/proc/meminfo". > Is that correct? Yes. I didn't write any of the code in dfly.c though, I just copied it over from freebsd.c and removed the portions that were obsolete/broken on dragonfly, so the linprocfs dependency didn't bother me: it's what the original code did. Feel free to improve it and if you do, please start by running indent on it; such code makes the gnu style look beautiful by comparison. Or, even better, throw it out the window and start from scratch 8) Aggelos
文章代碼(AID): #11V_Us00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #11V_Us00 (DFBSD_kernel)