Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2006 15:56:57 -0200
From:      Rainer Alves <rainer.alves@gmail.com>
To:        Fernan Aguero <fernan@iib.unsam.edu.ar>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: porting an app that checks /proc/meminfo
Message-ID:  <43D66A69.4010005@gmail.com>
In-Reply-To: <20060124172317.GF72149@iib.unsam.edu.ar>
References:  <20060124172317.GF72149@iib.unsam.edu.ar>

next in thread | previous in thread | raw e-mail | index | archive | help
Fernan Aguero wrote:
> The program builds fine, but because it uses /proc/meminfo
> to check for available memory, when you run it, it will
> complain about the lack of /proc/meminfo and won't let you
> do anything. 
> 
...
> How does one gets the values of i) memory used by the
> program/process and ii) amount of RAM available in the
> computer without using /proc/meminfo in FreeBSD? 

Take a loot at sysutils/muse, which uses /dev/mem to gather this info:

[rainer@bsd ~]$ muse -m
kvm_open: /dev/mem: Permission denied
kvm_open failed

[rainer@bsd ~]$ sudo muse -m
Active:      311.965 MB
Inactive:     54.039 MB
Wired:        99.977 MB
Reserved:      0.961 MB
Cache:        25.812 MB
Kernel:        0.133 MB
Interrupt:     0.008 MB
Buffer:       59.969 MB

Total:       493.637 MB
Free:          1.141 MB





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43D66A69.4010005>