memory leakage
Denys Vlasenko
vda.linux at googlemail.com
Wed Feb 10 15:11:01 UTC 2010
On Wed, Feb 10, 2010 at 12:03 PM, Rob Landley <rob at landley.net> wrote:
> On Wednesday 10 February 2010 04:04:44 farajian amin wrote:
>> Dear All,
>>
>> I have experienced a memory leakage when i use busybox-1.14.1 on Snapgear
>> linux( for leon architecture) (kernel 2.6.21.1). I am not quite sure that
>> if this is a busybox problem or kernel. The problem is as follows:
>>
>> when we run the following script in busybox (ash) , the memory leak appears
>> , and kill all mem at end. ---------------------------------
>> #!/bin/ash
>> while [ 1 ];
>> do
>> GATEWAY=`iproute | grep default | awk '{print $3}'
>> done
>
> To properly diagnose it, you could throw "top -n1" in the loop and see how
> much memory usage grows. (Unfortunately, I don't see a way to tell busybox
> top to sort by memory usage from the command line, the way hitting "m" when
> it's interactive does. You'll probably need "top -n1 -b" and something to
BTW try hitting 's', it's way better than 'm' :)
> parse the output. On the device side of things would be good if you're
> talking to the device through a serial console and it takes a while to
> trigger...)
No need to parse anything. There is an applet (which you found "useless"
some years ago) which makes this sort of monitoring easy:
# nmeter '%t %c mem %m free %[mf] processes %[pn]'
16:10:05 UU........ mem 526m free 1.4g processes 276
16:10:06 U......... mem 526m free 1.4g processes 276
16:10:07 .......... mem 526m free 1.4g processes 276
...
--
vda
More information about the busybox
mailing list