Fwd: Busy Box command lines

Harald Becker ralda at gmx.de
Fri May 6 14:08:27 UTC 2011


> Is it possible using command ps to have busy box provide a list of the
> top 10 memory/cpu files in use?

The functionality to display CPU or memory utilization is not included
in Busybox ps (at least in older versions). The lacking if those is one
of the features I'm rally missing.

... else you could do something like this:

ps -o pcpu,pid | tail -n +2 | sort -r | head -10

ps -o format = display status columns you like

tail -n +2 = suppress header line

sort -r ... = sort status output the way you like

head -10 = display wanted top most lines of sorted status

... but Busybox ps lacks pcpu (%cpu) and pmem (%mem) :-(

[May be you are able to achieve your needs using the top command. (Hint:
use -n1 option)]


More information about the busybox mailing list