How do I calculate the size and utilization of my VM from sysctl?
Danny Howard
djh at servercentral.net
Wed Jun 30 09:45:34 PDT 2004
Phil Schulz wrote:
> Danny Howard wrote:
>
>> What's the easiest command to read to get good information on memory
>> usage? I played with "/sbin/sysctl -n hw.physmem hw.usermem
>> vm.kvm_size vm.kvm_free" yesterday but I have the feeling that these
>> are not the numbers I think they are, because they add up wrong.
>>
>> There's some pretty good stuff at the top of top, but I'd be happier
>> with output in raw numbers of bytes, to feed to my graphing program.
>> This would also save the trouble of reinterpreting M into * 1024^2.
>
[...]
> Are you looking for vmstat(8)?
Actually, I'm looking for:
"How do I calculate the size and utilization of my VM from sysctl?"
vm.kvm_size is not consistent with the size of swap output by top. But
then, I'm not sure what "kvm" is supposed to be anyway. I've looked at
vm.stats.vm.v_page_size * vm.stats.vm.v_page_count but that aint right
either ... ?
Thanks,
-danny
--
Danny Howard djh at servercentral.net
Technical Support Manager (312)829-1111 x235
Server Central Network http://www.servercentral.net
More information about the freebsd-questions
mailing list