DragonFly BSD
DragonFly kernel List (threaded) for 2004-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: trouble getting memory and swap info


From: Glenn Johnson <glennpj@xxxxxxxxxxx>
Date: Wed, 27 Oct 2004 22:30:42 -0500

On Wed, 2004-10-27 at 22:16 +0300, Aggelos Economopoulos wrote:

> On Wednesday 27 October 2004 21:46, Glenn Johnson wrote:

> > 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)

I played with this a bit more.  It turns out I was real close to having
it working initially.  I only needed to ifdef out one more statement in
the sysdeps/freebsd.c file.  According to my interpretation of the
original freebsd.c file, the usage of /compat/linux/proc/meminfo is a
fallback and should not normally be executed.  Anyway, I got it working
without using linprocfs.

Thanks.

-- 
Glenn Johnson <glennpj@xxxxxxxxxxx>




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]