• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get nbr of resident pages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get nbr of resident pages


  • Subject: Re: How to get nbr of resident pages
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Thu, 26 Apr 2012 21:51:47 +0700

On 25 Apr 2012, at 05:42, comex wrote:

> On Sat, Apr 21, 2012 at 3:10 AM, Gerriet M. Denkmann
> <email@hidden> wrote:
>> I thought that  vmmeter.v_wire_count +  vmmeter .v_active_count  would be the answer.
>>
>> So I tried:
>> int mib[] = { CTL_VM, VM_METER };
>> [...]
>> int res = sysctl(mib, miblen, &vmmeter, &len, NULL, 0);
>>
>> But got: errno = 2 = "No such file or directory"
>>
>> So: How do I get the number of resident pages of all processes?
>
> VM_METER doesn't seem to be implemented in xnu, but top, which reports
> this information, uses a different call:
>
> 	kr = host_statistics(libtop_port, HOST_VM_INFO,
> (host_info_t)&tsamp->vm_stat, &count);
>
> - http://www.opensource.apple.com/source/top/top-73/libtop.c

Thanks! This is exactly what I needed.

Gerriet.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to get nbr of resident pages (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to get nbr of resident pages (From: comex <email@hidden>)

  • Prev by Date: Re: How to get nbr of resident pages
  • Next by Date: setting kernel shared memory on 10.7.3
  • Previous by thread: Re: How to get nbr of resident pages
  • Next by thread: Querying for children pid
  • Index(es):
    • Date
    • Thread