From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qe0-f42.google.com (mail-qe0-f42.google.com [209.85.128.42]) by kanga.kvack.org (Postfix) with ESMTP id 5A2C36B0031 for ; Mon, 30 Dec 2013 20:52:21 -0500 (EST) Received: by mail-qe0-f42.google.com with SMTP id b4so12175415qen.15 for ; Mon, 30 Dec 2013 17:52:21 -0800 (PST) Received: from nm50.bullet.mail.bf1.yahoo.com (nm50.bullet.mail.bf1.yahoo.com. [216.109.114.67]) by mx.google.com with ESMTPS id m3si19441293qcg.80.2013.12.30.17.52.19 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 30 Dec 2013 17:52:20 -0800 (PST) References: <1388341026.52582.YahooMailNeo@web160105.mail.bf1.yahoo.com> <52C0854D.2090802@googlemail.com> Message-ID: <1388454739.81970.YahooMailNeo@web160105.mail.bf1.yahoo.com> Date: Mon, 30 Dec 2013 17:52:19 -0800 (PST) From: PINTU KUMAR Reply-To: PINTU KUMAR Subject: Re: Help about calculating total memory consumption during booting In-Reply-To: <52C0854D.2090802@googlemail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1322375793-851798681-1388454739=:81970" Sender: owner-linux-mm@kvack.org List-ID: To: Stefan Beller , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "mgorman@suse.de" ---1322375793-851798681-1388454739=:81970 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=0A=0AThanks for the reply, I know about top, but top does not help much= in arriving at the total memory consumption.=0A=0AI need the physical memo= ry usage breakup of each process during bootup, with a segregate of user an= d kernel allocation.=0A=0A1) If I add up all "Pss" field in "proc//sma= ps, do I get the total Used memory?=0A2) Is the Pss value includes the kern= el side allocation as well?=0A3) What fields I should choose from /proc/mem= info" to correctly arrive at the "Used" memory in the system?=0A4) What abo= ut the memory allocation for kernel threads during booting? Why does its Ps= s/Rss value shows 0 always=0A=0AI already tried adding up all "PSS" values = in every PIDs, but still it does not match any where near to the total used= memory in the system.=0A=0APlease help.=0A=0A=0AThanks,=0APintu=0A=0A=0A= =0A>________________________________=0A> From: Stefan Beller =0A>To: PINTU KUMAR ; "linux-mm@kva= ck.org" ; "linux-kernel@vger.kernel.org" ; "mgorman@suse.de" =0A>Sent: Monday, 30 = December 2013 1:55 AM=0A>Subject: Re: Help about calculating total memory c= onsumption during booting=0A> =0A>=0A>On 29.12.2013 19:17, PINTU KUMAR wrot= e:=0A>> Hi,=0A>> =0A>> I need help in roughly calculating the total memory = consumption in an embedded Linux system just after booting is finished.=0A>= > I know, I can see the memory stats using "free" and "/proc/meminfo"=0A>> = =0A>> But, I need the breakup of "Used" memory during bootup, for both kern= el space and user application.=0A>> =0A>> Example, on my ARM machine with 1= 28MB RAM, the free memory reported is roughly:=0A>> Total: 90MB=0A>> Used: = 88MB=0A>> Free: 2MB=0A>> Buffer+Cached: (5+19)MB=0A>> =0A>> Now, my questio= n is, how to find the breakup of this "Used" memory of "88MB".=0A>> This sh= ould include both kernel space allocation and user application allocation(i= ncluding daemons).=0A>> =0A>=0A>http://www.linuxatemyram.com/ dont panic ;)= =0A>=0A>How about htop, top or=0A>"valgrind --tool massif"=0A>=0A>=0A>=0A>= =0A>=0A>--=0A>To unsubscribe, send a message with 'unsubscribe linux-mm' in= =0A>the body to majordomo@kvack.org.=A0 For more info on Linux MM,=0A>see: = http://www.linux-mm.org/ .=0A>Don't email: email@kvack.org =0A>=0A>=0A> ---1322375793-851798681-1388454739=:81970 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,<= /div>

Thanks for the reply, I know about top, but top do= es not help much in arriving at the total memory consumption.
I need the physical memory usage breakup of each process during= bootup, with a segregate of user and kernel allocation.

1) If I add up all "Pss" field in "proc/<PID>/smaps, do I get = the total Used memory?
2) Is the Pss value includes the kernel si= de allocation as well?
3) What fields I should choose from /proc/= meminfo" to correctly arrive at the "Used" memory in the system?
= 4) What about the memory allocation for kernel threads during booting? Why = does its Pss/Rss value shows 0 always

I already tried adding up all "PSS" values in every PIDs, but stil= l it does not match any where near to the total used memory in the system.<= /div>

Please help.


Thanks,
Pintu



From: Stefan Beller <stefanbelle= r@googlemail.com>
To: PINTU KUMAR <pintu_agarwal@yahoo.com>; "linux-mm@kvack.org" <li= nux-mm@kvack.org>; "linux-kernel@vger.kernel.org" <linux-kernel@vger.= kernel.org>; "mgorman@suse.de" <mgorman@suse.de>
Sent: Monday, 30 December 2013 1:55 AM=
Subject: Re: Help abo= ut calculating total memory consumption during booting
<= div class=3D"y_msg_container">
On 29.12.2013 19:17, PINTU KUMAR wrote:> Hi,
>
> I = need help in roughly calculating the total memory consumption in an embedde= d Linux system just after booting is finished.
> I kno= w, I can see the memory stats using "free" and "/proc/meminfo"
>
> But, I need the breakup of "Used" memory during bo= otup, for both kernel space and user application.
> > Example, on my ARM machine with 128MB RAM, the free m= emory reported is roughly:
> Total: 90MB
> Used: 88MB
> Free: 2MB
>= ; Buffer+Cached: (5+19)MB
>
> No= w, my question is, how to find the breakup of this "Used" memory of "88MB".=
> This should include both kernel space allocation an= d user application allocation(including daemons).
>
http://www.linuxatemyram.com/ dont = panic ;)

How about htop, top or
"valgrind --tool massif"





--=
To unsubscribe, send a message with 'unsubscribe linux-m= m' in
the body to majordomo@kvack.org= .  For more info on Linux MM,
see: http://www.linux-m= m.org/ .
Don't email: <a href=3Dmailto:"= dont@kvack.org"> email@kvack.org </a>


---1322375793-851798681-1388454739=:81970-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org