Linux (or Ubuntu specific) tools to measure number of page faults

Alfred Zhong alfchung02 at gmail.com
Thu May 3 02:08:32 UTC 2012


Thank you all so much!

On Wed, May 2, 2012 at 5:47 AM, Colin Ian King <colin.king at canonical.com>wrote:

> On 01/05/12 02:53, Alfred Zhong wrote:
>
>> Dear Ubuntu Developers, especially Kernel Hackers,
>>
>>
>> This may be a stupid question, please excuse my ignorance.
>>
>> I am doing a project on Linux scheduler that trying to minimize number
>> of page faults.
>>
>> I finished the algorithm implementation and I need to measure the
>> effect. I am wondering if Linux provides tools to record number of page
>> fault happened during the whole execution process?
>>
>> Basically, I want something like $ pfstat ./a.out page faults: 3
>> Execution Time: 1003 ms
>>
>> Is there such a tool? I want to make sure before deciding to write one
>> by myself, which will be a lot of work...
>>
>> Thanks a lot!
>>
>> Alfred
>>
>>  There are well defined APIs for collecting this kind of data, for
> example you can collect the rusage info for an exiting child process using
> wait3() or wait4().
>
> References:
>   man 2 wait3
>   man 2 rusage
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20120502/04f5b277/attachment.html>


More information about the Ubuntu-devel-discuss mailing list