Page owned by user

Hello people,

I want of find the number of pages each user has in FreeBSD kernel.
Can anyone help me with this? I know there is no direct link between user and pages but between pages and object. But I am having trouble connecting that to find the user that owns that page.
Help!!
 
potterv said:
...the user that owns that page.

The process owns the page.

However, if you look at /usr/include/sys/proc.h there is a member in struct proc
Code:
struct proc {
    ...
    struct ucred *p_ucred; /* (c) Process owner's identity. */
    ...
}
which you can use to extract the data you need.
 
Back
Top