【发布时间】:2013-04-11 14:13:23
【问题描述】:
我知道我可以通过使用来监控总使用量,例如:
adb top -m 10
但我有兴趣单独监控每个 CPU。在 Linux 上使用 top,我可以使用交互式命令 '1' 分别显示每个 CPU 的使用情况。如何在 Android 上执行此操作?
【问题讨论】:
标签: android monitoring cpu-usage multicore
我知道我可以通过使用来监控总使用量,例如:
adb top -m 10
但我有兴趣单独监控每个 CPU。在 Linux 上使用 top,我可以使用交互式命令 '1' 分别显示每个 CPU 的使用情况。如何在 Android 上执行此操作?
【问题讨论】:
标签: android monitoring cpu-usage multicore
看起来你不能:
# top -h
Usage: top [ -m max_procs ] [ -n iterations ] [ -d delay ] [ -s sort_column ] [ -t ] [ -h ]
-m num Maximum number of processes to display.
-n num Updates to show before exiting.
-d num Seconds to wait between updates.
-s col Column to sort by (cpu,vss,rss,thr).
-t Show threads instead of processes.
-h Display this help screen.
您可以使用systrace 来跟踪每个 cpu 进程的执行时间。另见Analyzing Display and Performance with Systrace。如果你有一个 root 设备,busybox 可能会有更完整的实现。
【讨论】: