I usually use /proc/<pid>/smaps. Go through http://unix.stackexchange.com/questions/33381/getting-information-about-a-process-memory-usage-from-proc-pid-smaps .
On Thu, Jun 26, 2014 at 8:27 PM, Joshua Judson Rosen <[email protected]> wrote: > On 2014-06-25 23:22, Le Tran Dat wrote: > >> Hi list, >> >> I am compiling Openwrt image. However, the current board is pretty low in >> RAM. I >> would like to check which application accounts for the most ram usage. >> > > Measuring RAM usage is actually a somewhat complicated issue, due to things > like shared memory (as David said) and copy-on-write memory. > > There's a pretty good, detailed, description of the issues, and approaches > for > dealing with them ("asking Linux the right questions") on elinux.org: > > http://elinux.org/Runtime_Memory_Measurement > > I've found the approach used by the "mem_usage" script on that page useful > in the past > (scan through /proc/*/maps and total up the `anonymous' ranges). > > Depending on how much detail you need/want to get into, it may also be > interesting > to take a look at the patches linked from that page. > > -- > "'tis an ill wind that blows no minds." > > _______________________________________________ > openwrt-users mailing list > [email protected] > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users >
_______________________________________________ openwrt-users mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
