From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169]) by kanga.kvack.org (Postfix) with ESMTP id BD1596B0031 for ; Sun, 29 Dec 2013 13:19:51 -0500 (EST) Received: by mail-ie0-f169.google.com with SMTP id e14so11441376iej.28 for ; Sun, 29 Dec 2013 10:19:51 -0800 (PST) Received: from nm31.bullet.mail.ne1.yahoo.com (nm31.bullet.mail.ne1.yahoo.com. [98.138.229.24]) by mx.google.com with SMTP id jw1si52157649icc.114.2013.12.29.10.19.50 for ; Sun, 29 Dec 2013 10:19:50 -0800 (PST) Message-ID: <1388341026.52582.YahooMailNeo@web160105.mail.bf1.yahoo.com> Date: Sun, 29 Dec 2013 10:17:06 -0800 (PST) From: PINTU KUMAR Reply-To: PINTU KUMAR Subject: Help about calculating total memory consumption during booting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "mgorman@suse.de" Hi,=0A=0AI need help in roughly calculating the total memory consumption in= an embedded Linux system just after booting is finished.=0AI know, I can s= ee the memory stats using "free" and "/proc/meminfo"=0A=0ABut, I need the b= reakup of "Used" memory during bootup, for both kernel space and user appli= cation.=0A=0AExample, on my ARM machine with 128MB RAM, the free memory rep= orted is roughly:=0ATotal: 90MB=0AUsed: 88MB=0AFree: 2MB=0ABuffer+Cached: (= 5+19)MB=0A=0ANow, my question is, how to find the breakup of this "Used" me= mory of "88MB".=0AThis should include both kernel space allocation and user= application allocation(including daemons).=0A=0AIf anybody knows about any= tools(or techniques) please help.=0A=0AFew doubts:=0A1) If I add up all "P= ss" field in "proc//smaps, do I get the total Used memory?=0A2) Is the= Pss value includes the kernel side allocation as well?=0A3) What fields I = should choose from ?proc/meminfo" to correctly arrive at the "Used" memory = in the system?=0A4) What about the memory allocation for kernel threads dur= ing booting? Why does its Pss/Rss value shows 0 always?=0A=0APlease help.= =0A=0A=0AThank You!=0ARegards,=0APintu -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com [209.85.215.182]) by kanga.kvack.org (Postfix) with ESMTP id 13ADB6B0031 for ; Sun, 29 Dec 2013 15:26:28 -0500 (EST) Received: by mail-ea0-f182.google.com with SMTP id a15so4870361eae.27 for ; Sun, 29 Dec 2013 12:26:28 -0800 (PST) Received: from mail-ea0-f169.google.com (mail-ea0-f169.google.com [209.85.215.169]) by mx.google.com with ESMTPS id s42si49212957eew.224.2013.12.29.12.26.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Dec 2013 12:26:28 -0800 (PST) Received: by mail-ea0-f169.google.com with SMTP id l9so4177731eaj.14 for ; Sun, 29 Dec 2013 12:25:53 -0800 (PST) Message-ID: <52C0854D.2090802@googlemail.com> Date: Sun, 29 Dec 2013 21:25:49 +0100 From: Stefan Beller MIME-Version: 1.0 Subject: Re: Help about calculating total memory consumption during booting References: <1388341026.52582.YahooMailNeo@web160105.mail.bf1.yahoo.com> In-Reply-To: <1388341026.52582.YahooMailNeo@web160105.mail.bf1.yahoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: PINTU KUMAR , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "mgorman@suse.de" On 29.12.2013 19:17, PINTU KUMAR wrote: > Hi, > > I need help in roughly calculating the total memory consumption in an embedded Linux system just after booting is finished. > I know, I can see the memory stats using "free" and "/proc/meminfo" > > But, I need the breakup of "Used" memory during bootup, for both kernel space and user application. > > Example, on my ARM machine with 128MB RAM, the free memory reported is roughly: > Total: 90MB > Used: 88MB > Free: 2MB > Buffer+Cached: (5+19)MB > > Now, my question is, how to find the breakup of this "Used" memory of "88MB". > This should include both kernel space allocation and 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-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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) by kanga.kvack.org (Postfix) with ESMTP id 7776A6B0031 for ; Mon, 30 Dec 2013 20:54:17 -0500 (EST) Received: by mail-qc0-f173.google.com with SMTP id m20so11334094qcx.4 for ; Mon, 30 Dec 2013 17:54:17 -0800 (PST) Received: from nm48.bullet.mail.bf1.yahoo.com (nm48.bullet.mail.bf1.yahoo.com. [216.109.114.64]) by mx.google.com with SMTP id lc9si29056397qeb.62.2013.12.30.17.54.16 for ; Mon, 30 Dec 2013 17:54:16 -0800 (PST) References: <1388341026.52582.YahooMailNeo@web160105.mail.bf1.yahoo.com> <52C0854D.2090802@googlemail.com> Message-ID: <1388454855.7071.YahooMailNeo@web160101.mail.bf1.yahoo.com> Date: Mon, 30 Dec 2013 17:54:15 -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: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Stefan Beller , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "mgorman@suse.de" =0A=0A=0A=0A=0A>________________________________=0A> From: Stefan Beller =0A>To: PINTU KUMAR ; "= linux-mm@kvack.org" ; "linux-kernel@vger.kernel.org" ; "mgorman@suse.de" =0A>Sent:= Monday, 30 December 2013 1:55 AM=0A>Subject: Re: Help about calculating to= tal memory consumption during booting=0A> =0A>=0A>On 29.12.2013 19:17, PINT= U KUMAR wrote:=0A>> Hi,=0A>> =0A>> I need help in roughly calculating the t= otal memory consumption in an embedded Linux system just after booting is f= inished.=0A>> I know, I can see the memory stats using "free" and "/proc/me= minfo"=0A>> =0A>> But, I need the breakup of "Used" memory during bootup, f= or both kernel space and user application.=0A>> =0A>> Example, on my ARM ma= chine with 128MB 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 question is, how to find the breakup of this "Used" memory of "88MB".= =0A>> This should include both kernel space allocation and user application= allocation(including 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=0AThanks for the reply, I know about top, but top does not he= lp much in arriving at the total memory consumption.=0A=0A=0AI need the phy= sical memory usage breakup of each process during bootup, with a segregate = of user and kernel allocation.=0A=0A1) If I add up all "Pss" field in "proc= //smaps, do I get the total Used memory?=0A2) Is the Pss value include= s the kernel side allocation as well?=0A3) What fields I should choose from= /proc/meminfo" to correctly arrive at the "Used" memory in the system?=0A4= ) What about the memory allocation for kernel threads during booting? Why d= oes its Pss/Rss value shows 0 always=0A=0AI already tried adding up all "PS= S" values in every PIDs, but still it does not match any where near to the = total used memory in the system.=0A=0APlease help. -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752206Ab3L2SUE (ORCPT ); Sun, 29 Dec 2013 13:20:04 -0500 Received: from nm38.bullet.mail.ne1.yahoo.com ([98.138.229.31]:21164 "HELO nm38.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751667Ab3L2SUB convert rfc822-to-8bit (ORCPT ); Sun, 29 Dec 2013 13:20:01 -0500 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 811820.26220.bm@omp1004.mail.bf1.yahoo.com DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=rv7JuCL0s2F3SfEbXAv17004DjatkBCjh+o/vUmLXGIwN3LGwbxstBQEGYdvJeXC7iIHPMHQcVvlif3mrpdsevTCeeqsIAeVVkMdybZlhJ/DIZaP9nm/FYqTi4bnPYR/pxa4ckuCcZN0NpTrzL7XK705nnq4utq+418ocz1RDek=; X-YMail-OSG: yBYGfW0VM1nFbo4oLK.B.fKgkBbMTBBQ3pK9No0BZOsP04_ wVw4pq.x5vfE8iddy.VgCbhjQhxRy.dTIBBpzM7ZEiolt1c2KWtpIM3xaLtF KLvcOVISNHbexl9ukgaWAN5O0TxmXEOgCTvPp3kF5CXdt28UpMUir_kCaPAj _WWkH2AYbLuuBBCXoh3aZ6tdhZgEvq5gAteigv.DmeqnlAJhQqYVE7mTK6c0 JnP8kim6Bd6w0IzlPUury8X7Zmp5l8EKKxdRPr563qdXpiXaLeHB2cxMPXoi ekvEhiGgDEdexwy_rBOhcT8EDher_oAxTE.T5yFfk2id8Mz10S_rgWzofMzZ amqYgqFQAPg2r3OfQllPW_5ZgpXlthfe.saBZBpr.jk7iEa00I4tnl7lyjJW VB3X1nyiDREeDJZsL3ruBZeH0vgmhUMrMtcb8QiT7z9Z_InLli4vMs_vLFST 8cqFZf0wleKvPCaBABGkh1UclKK9enJU6tZmq_jflro2fvIYmdpgWG4snt7U QR92_cotU9y4A4L0GRO7KcobTesUc4EQJzJ.3VMCvJZ2lIr2ocM.oHrG1XSG Fek5SPwocTCTOMRmV42KOB3qLIK8RKoom X-Rocket-MIMEInfo: 002.001,SGksCgpJIG5lZWQgaGVscCBpbiByb3VnaGx5IGNhbGN1bGF0aW5nIHRoZSB0b3RhbCBtZW1vcnkgY29uc3VtcHRpb24gaW4gYW4gZW1iZWRkZWQgTGludXggc3lzdGVtIGp1c3QgYWZ0ZXIgYm9vdGluZyBpcyBmaW5pc2hlZC4KSSBrbm93LCBJIGNhbiBzZWUgdGhlIG1lbW9yeSBzdGF0cyB1c2luZyAiZnJlZSIgYW5kICIvcHJvYy9tZW1pbmZvIgoKQnV0LCBJIG5lZWQgdGhlIGJyZWFrdXAgb2YgIlVzZWQiIG1lbW9yeSBkdXJpbmcgYm9vdHVwLCBmb3IgYm90aCBrZXJuZWwgc3BhY2UgYW5kIHVzZXIgYXBwbGkBMAEBAQE- X-Mailer: YahooMailWebService/0.8.172.614 Message-ID: <1388341026.52582.YahooMailNeo@web160105.mail.bf1.yahoo.com> Date: Sun, 29 Dec 2013 10:17:06 -0800 (PST) From: PINTU KUMAR Reply-To: PINTU KUMAR Subject: Help about calculating total memory consumption during booting To: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "mgorman@suse.de" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I need help in roughly calculating the total memory consumption in an embedded Linux system just after booting is finished. I know, I can see the memory stats using "free" and "/proc/meminfo" But, I need the breakup of "Used" memory during bootup, for both kernel space and user application. Example, on my ARM machine with 128MB RAM, the free memory reported is roughly: Total: 90MB Used: 88MB Free: 2MB Buffer+Cached: (5+19)MB Now, my question is, how to find the breakup of this "Used" memory of "88MB". This should include both kernel space allocation and user application allocation(including daemons). If anybody knows about any tools(or techniques) please help. Few doubts: 1) If I add up all "Pss" field in "proc//smaps, do I get the total Used memory? 2) Is the Pss value includes the kernel side 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? Please help. Thank You! Regards, Pintu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752566Ab3L2UZz (ORCPT ); Sun, 29 Dec 2013 15:25:55 -0500 Received: from mail-ee0-f43.google.com ([74.125.83.43]:45227 "EHLO mail-ee0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752426Ab3L2UZy (ORCPT ); Sun, 29 Dec 2013 15:25:54 -0500 Message-ID: <52C0854D.2090802@googlemail.com> Date: Sun, 29 Dec 2013 21:25:49 +0100 From: Stefan Beller User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: PINTU KUMAR , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "mgorman@suse.de" Subject: Re: Help about calculating total memory consumption during booting References: <1388341026.52582.YahooMailNeo@web160105.mail.bf1.yahoo.com> In-Reply-To: <1388341026.52582.YahooMailNeo@web160105.mail.bf1.yahoo.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29.12.2013 19:17, PINTU KUMAR wrote: > Hi, > > I need help in roughly calculating the total memory consumption in an embedded Linux system just after booting is finished. > I know, I can see the memory stats using "free" and "/proc/meminfo" > > But, I need the breakup of "Used" memory during bootup, for both kernel space and user application. > > Example, on my ARM machine with 128MB RAM, the free memory reported is roughly: > Total: 90MB > Used: 88MB > Free: 2MB > Buffer+Cached: (5+19)MB > > Now, my question is, how to find the breakup of this "Used" memory of "88MB". > This should include both kernel space allocation and user application allocation(including daemons). > http://www.linuxatemyram.com/ dont panic ;) How about htop, top or "valgrind --tool massif" From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756205Ab3LaB7u (ORCPT ); Mon, 30 Dec 2013 20:59:50 -0500 Received: from nm37-vm1.bullet.mail.bf1.yahoo.com ([72.30.238.201]:34360 "HELO nm37-vm1.bullet.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752516Ab3LaB7t convert rfc822-to-8bit (ORCPT ); Mon, 30 Dec 2013 20:59:49 -0500 X-Greylist: delayed 333 seconds by postgrey-1.27 at vger.kernel.org; Mon, 30 Dec 2013 20:59:49 EST X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 969309.76375.bm@omp1056.mail.bf1.yahoo.com DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=KB6yaEMhGKmOSXMPkmga+HfAeqy4W8QJeigZy7uaRwiBWfk5afegwzB3VeDkyvd5qCQYSNEILgRUA0M6puhsQ76JDlPRv9my4nYQib3ZCEdHzsDBCXnCGfM27qP5OBft6Za0iac8AbUzQiMlTCPPcWh2n85yiGuCA6cM13YtorI=; X-YMail-OSG: tHVycpQVM1k8b8TKBSYVSdDPl5zCrdKKVKLZNix6tKYJyr6 X2lCrP1AUvCKMMl9T7VNtq9CsjCJ.YH2grQF2cJBSYX.W1d2uQMqi23Os7U4 zAiwKtZABX5WZ4mvwyWx7YUDnWhPzTGzaJaYdsR7gfYN6duIt0W8TCZUdfel 2l_GWUpaxf2sel.60T2IsItWzYxLduwFqxnGEzb0LPuLL3NCQ2A0j72B0VsK Z1Krb31pd9n3vYDC1VFzFktnJ14Ut_f121CYedtDlp9lSPhVg4DMlPOWNE2Q FIFbAEuFG__17wgMrtRdGBy5DrUA9Us9aij0it7ZnlRB9Dg1dIU0lLFeHEqe Id6Y2XS0m6tGa4kWWz1qwwTc2EByX.IUqtAOLxYEplWD.xn0dv66cJU8eSEG nj3Qwfl9v.BkSMCdyTVt9Pw_55A9G6FyWOwJk81FfZxgeORZft3AuFp6UQmw FXIQLhHFeaKRB1xfjI6JFzwj7n7_nmCZXOkGMV9OhQcUOx8guss1H94qzIV1 0f561OSyzJpvXqfxYrLmivpvtIZB2TQaJUQMxUN3QeM82ZBOd06vQ3rCqRXA hUoJVQ88EfiLw478z9JywKPaDSc944XFKf8RMr_WDvZmwsh.owr302yTKnlM 41rsYWSo9V0lUH9PCzfVW2zBcsFl3XUGdaOz2eKvxJzg- X-Rocket-MIMEInfo: 002.001,CgoKCgo.X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KPiBGcm9tOiBTdGVmYW4gQmVsbGVyIDxzdGVmYW5iZWxsZXJAZ29vZ2xlbWFpbC5jb20.Cj5UbzogUElOVFUgS1VNQVIgPHBpbnR1X2FnYXJ3YWxAeWFob28uY29tPjsgImxpbnV4LW1tQGt2YWNrLm9yZyIgPGxpbnV4LW1tQGt2YWNrLm9yZz47ICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiA8bGludXgta2VybmVsQHZnZXIua2VybmVsLm9yZz47ICJtZ29ybWFuQHN1c2UuZGUiIDxtZ29ybWFuQHN1c2UuZGU.IAo.U2VudDogTW9uZGEBMAEBAQE- X-Mailer: YahooMailWebService/0.8.172.614 References: <1388341026.52582.YahooMailNeo@web160105.mail.bf1.yahoo.com> <52C0854D.2090802@googlemail.com> Message-ID: <1388454855.7071.YahooMailNeo@web160101.mail.bf1.yahoo.com> Date: Mon, 30 Dec 2013 17:54:15 -0800 (PST) From: PINTU KUMAR Reply-To: PINTU KUMAR Subject: Re: Help about calculating total memory consumption during booting To: Stefan Beller , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "mgorman@suse.de" In-Reply-To: <52C0854D.2090802@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >________________________________ > From: Stefan Beller >To: PINTU KUMAR ; "linux-mm@kvack.org" ; "linux-kernel@vger.kernel.org" ; "mgorman@suse.de" >Sent: Monday, 30 December 2013 1:55 AM >Subject: Re: Help about calculating total memory consumption during booting > > >On 29.12.2013 19:17, PINTU KUMAR wrote: >> Hi, >> >> I need help in roughly calculating the total memory consumption in an embedded Linux system just after booting is finished. >> I know, I can see the memory stats using "free" and "/proc/meminfo" >> >> But, I need the breakup of "Used" memory during bootup, for both kernel space and user application. >> >> Example, on my ARM machine with 128MB RAM, the free memory reported is roughly: >> Total: 90MB >> Used: 88MB >> Free: 2MB >> Buffer+Cached: (5+19)MB >> >> Now, my question is, how to find the breakup of this "Used" memory of "88MB". >> This should include both kernel space allocation and user application allocation(including daemons). >> > >http://www.linuxatemyram.com/ dont panic ;) > >How about htop, top or >"valgrind --tool massif" > > Thanks for the reply, I know about top, but top does 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//smaps, do I get the total Used memory? 2) Is the Pss value includes the kernel side 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 still it does not match any where near to the total used memory in the system. Please help.