From owner-freebsd-ports@FreeBSD.ORG Mon May 19 06:30:14 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3810E75 for ; Mon, 19 May 2014 06:30:14 +0000 (UTC) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1F7E24C2 for ; Mon, 19 May 2014 06:30:14 +0000 (UTC) Received: by mail-ig0-f169.google.com with SMTP id hl10so3854480igb.4 for ; Sun, 18 May 2014 23:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=Q9xzwj0cMdMDU4+E+i53raDm1oNxwdRdKgvCghbV+iw=; b=UJWj+5tSfC0Y/75F1wYpjQ2d7lc7cM9656X11sTMbSrQTqKGp9ujzOHo+ST87Q0Ccl DJKL//Z1HO4hPIWNANAq5gK+0W3a7jQpYpXvCzodTi6Ae9oAesxPDlQoqpTzOkV596Je CYecNoeFtqRd5bizZsB22E2oZ6x8/ChRYAF6gda6Qu1W+8/7b/iD4umyeDCf/5pp/s2U UyAelejz7Jeez5CaUzSKW9cikA5lg7aiFBVLjj3thtYERZU5R13hocVrXYvGBHSCnypj HsgyTdwUiQp3vjObiNGq3E6NsPT7VxKJZC8cRinQD/bNQXcT70/GY03oTNk/f0haP20n eynw== MIME-Version: 1.0 X-Received: by 10.42.99.138 with SMTP id w10mr31398302icn.42.1400481014167; Sun, 18 May 2014 23:30:14 -0700 (PDT) Received: by 10.50.232.167 with HTTP; Sun, 18 May 2014 23:30:14 -0700 (PDT) In-Reply-To: <20140518204546.GC48335@graf.pompo.net> References: <20140512213551.GE60374@graf.pompo.net> <20140513200131.GK23856@graf.pompo.net> <20140518204546.GC48335@graf.pompo.net> Date: Mon, 19 May 2014 01:30:14 -0500 Message-ID: Subject: Re: Patch wanted: VmRSS, VmSize and VmStk in /proc/pid/status From: Scot Hetzel To: Scot Hetzel , FreeBSD Ports Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 06:30:15 -0000 On Sun, May 18, 2014 at 3:45 PM, Thierry Thomas wrote= : > Le mer 14 mai 14 =E0 10:03:34 +0200, Scot Hetzel > =E9crivait : > >> >> > It's why I'm looking for help here: does somebody knows how the >> >> > corresponding values of these Vm... can be found in FreeBSD? >> >> >> >> You could try reading the source for linprocfs to see how it gets tho= se values: >> >> >> >> https://svnweb.freebsd.org/base/head/sys/compat/linprocfs/linprocfs.c= ?revision=3D263620&view=3Dmarkup#l748 >> > >> > Good idea, I'll check it! >> >> You may also want to check usr.bin/procstat and lib/libprocstat. > > Here I am - almost! I have written a patch giving all these values - > excepted VmPeak: I cannot find its definition neither in linprocfs nor > elsewhere. This value is also missing from our > /compat/linux/proc/%pid%/status. > > Setting it to -1 seems working, but if someone knows how to get it, it > would be better. > Have a look at the Linux Kernel: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/f= s/proc Look at array.c and task_mmu.c to see how VmPeak is calculated. --=20 DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised.