我知道我可以通过以下方式监控总使用量:
adb top -m 10
但我有兴趣分别监控每个 CPU。在 Linux 上使用 top,我可以使用交互式命令“1”来分别显示每个 CPU 的使用情况。我如何在 Android 上执行此操作?
最佳答案
看起来你不能:
# 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 可能会有更完整的实现。
关于android - 如何监控 Android 上 CPU 的使用情况?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15951081/