From owner-freebsd-questions@FreeBSD.ORG Sat Mar 20 18:50:24 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 009C01065676 for ; Sat, 20 Mar 2010 18:50:24 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from smtp.utwente.nl (smtp2.utsp.utwente.nl [130.89.2.9]) by mx1.freebsd.org (Postfix) with ESMTP id 791828FC0C for ; Sat, 20 Mar 2010 18:50:22 +0000 (UTC) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id o2KIoFk5018728; Sat, 20 Mar 2010 19:50:15 +0100 From: Pieter de Goeje To: freebsd-questions@freebsd.org Date: Sat, 20 Mar 2010 19:50:15 +0100 User-Agent: KMail/1.9.10 References: <4cac4bed1003181028h74aff209y31e9c70bfb6ec367@mail.gmail.com> In-Reply-To: <4cac4bed1003181028h74aff209y31e9c70bfb6ec367@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201003201950.15698.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: Jayadev Kumar Subject: Re: API to find the memory usage of a process. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 18:50:24 -0000 On Thursday 18 March 2010 18:28:48 Jayadev Kumar wrote: > Hi, > > I need to find the memory usage of a process, from inside the process. > Is there any system call > do this ? I was trying to find it from 'top' utility source code. I > couldn't find the port which it is coming > from yet. > > Thanks, > Jayadev. Check out getrusage(2). - Pieter