From owner-freebsd-questions Thu Nov 16 12:28:27 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mta03-svc.ntlworld.com (mta03-svc.ntlworld.com [62.253.162.43]) by hub.freebsd.org (Postfix) with ESMTP id 7B32837B4CF for ; Thu, 16 Nov 2000 12:28:24 -0800 (PST) Received: from m108-mp1-cvx1b.gui.ntl.com ([62.252.8.108]) by mta03-svc.ntlworld.com (InterMail vM.4.01.02.27 201-229-119-110) with ESMTP id <20001116202818.GONW283.mta03-svc.ntlworld.com@m108-mp1-cvx1b.gui.ntl.com>; Thu, 16 Nov 2000 20:28:18 +0000 Date: Thu, 16 Nov 2000 20:28:35 +0000 (GMT) From: George Reid X-Sender: geeorgy@sobek.nevernet.net To: Raymond Law Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD VM In-Reply-To: <4.3.0.20001116105701.00b69320@mail.vt.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 16 Nov 2000, Raymond Law wrote: > majflt doesn't increase when a process is generating page faults. Instead, > the swapper process (pid 0) gets all the page faults and it is the same as > the page faults given by cnt in vmmeter.c. Why is this happening? Is > there a way to get the number of page faults generated by a SINGLE process? Yes. ps -o majflt -p The code which increments the number of page faults for a given process is found in /sys/vm/vm_fault.c (circa line 856): curproc->p_stats->p_ru.ru_majflt++; > The above doesn't get increased. Yes, it does - certainly in 5.0-CURRENT and a quick look at the CVS repository reveals this code has been present for over 6 years. "And then it comes to be that the soothing light at the end of your tunnel was just a freight train, comin' your way." George Reid * greid@ukug.uk.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message