From owner-freebsd-questions Thu Nov 16 13:42:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.161.193]) by hub.freebsd.org (Postfix) with ESMTP id E3F8437B4CF for ; Thu, 16 Nov 2000 13:42:24 -0800 (PST) Received: from mail.vt.edu (gkar.cc.vt.edu [198.82.161.190]) by lennier.cc.vt.edu (8.11.0/8.11.0) with ESMTP id eAGLgFd265172; Thu, 16 Nov 2000 16:42:15 -0500 (EST) Received: from zathras.cc.vt.edu ([198.82.162.117]) by gkar.cc.vt.edu (Sun Internet Mail Server sims.3.5.2000.03.23.18.03.p10) with ESMTP id <0G4500JZV0AETN@gkar.cc.vt.edu>; Thu, 16 Nov 2000 16:42:14 -0500 (EST) Date: Thu, 16 Nov 2000 16:41:31 -0500 From: flaw Subject: RE: FreeBSD VM To: George Reid Cc: freebsd-questions Message-id: <3A1BFC94@zathras.cc.vt.edu> MIME-version: 1.0 X-Mailer: WebMail (Hydra) SMTP v3.61 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-WebMail-UserID: flaw X-EXP32-SerialNo: 00002964 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Thanks for the reply. When exactly is majflt incremented? I ran ps -o majflt -p on the Netscape process and it gave me a count of 291 the first time I ran Netscape after reboot. I killed the process and ran Netscape again. This time it gave me a count of 0. Thanks. Ray, >===== Original Message From George Reid ===== >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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message