Denys, That's really helpful.
I agree that free doesn't include the potentially-resuable cache area. I just want to run a script every midnight, and log it, and set some panic levels at which a reboot is better than letting in the OOM-monster, and losing control of my embedded box. D In article <[email protected]>, [email protected] (Denys Vlasenko) wrote: > *From:* Denys Vlasenko <[email protected]> > *To:* [email protected], [email protected] > *CC:* [email protected], [email protected] > *Date:* Thu, 3 Feb 2011 03:52:25 +0100 > > On Wednesday 02 February 2011 16:33, David Collier wrote: > > So the question is - how close is this box to the OOM of doom - > > is the > > inactive cached memory available for re-use if it's needed, or am > > I > > really 2M from the drop? > > One tool is free: > > $ free > total used free shared > buffers > Mem: 2054936 1078352 976584 0 > 94084 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > ^^ mostly irrelevant > -/+ buffers: 984268 1070668 <=== useful > Swap: 131068 0 131068 > > > Another is nmeter: > > $ nmeter '%t %c alloc:%m free:%[mf]' > 03:45:35 .......... alloc:190m free:1.7g > 03:45:36 .......... alloc:190m free:1.7g > 03:45:37 .......... alloc:190m free:1.7g > ^C > > Second estimate (1.7g) looks to be more correct than what free > says (1g) (because our free doesn't analyze Cached:NNN line): > > $ dd bs=1700M count=1 </dev/zero >/dev/null > > wasn't swapping (I heard no disk seeking), whereas > > $ dd bs=1800M count=1 </dev/zero >/dev/null > > swapped about 100M according to free: > > $ free > total used free shared > buffers > Mem: 2054936 225076 1829860 0 > 9252 > -/+ buffers: 215824 1839112 > Swap: 131068 121428 9640 > > > -- > vda > _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
