Mac OS X Shell实用程序,显示多核系统中各个CPU的使用情况 [英] Mac OS X shell utility that shows individual cpu usage in multi-core systems

查看:285
本文介绍了Mac OS X Shell实用程序,显示多核系统中各个CPU的使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一个osx实用程序,该实用程序显示每个cpu的cpu使用情况.例如 CPU 0-10% CPU 1-2% ...

I've been looking for a osx utility that shows cpu usage for each cpu. For example CPU 0 - 10% CPU 1 - 2% ...

我知道在其他类似Unix的系统(/proc,mpstat等)中获取此信息的方法有很多,但在osx中​​均无效.对于Mac,最有用的是top,但它仅显示总的cpu使用情况.我需要从外壳运行该应用程序,以便可以随时间记录使用情况.我还尝试了cpuwalk.d,但它仅显示应用程序是否在一个或多个内核中运行.

I know of many ways of getting this information in other Unix-like system (/proc, mpstat, etc) but none work in osx. The most useful one for Mac is top but it only shows total cpu usage. I need the application to be run from the shell so that I can log the usage over time. I also tried cpuwalk.d but it only shows you if the application is running in one or more cores.

如果您查看活动监视器"应用程序,您会发现它基本上显示与顶部相同的信息,但是增加了一个显示cpus负载的图形.

If you take a look at Activity Monitor app you will notice that it basically displays the same info as top, but with the addition of a graph that shows cpus load.

如果有人对如何获取信息有任何想法,我将不胜感激.谢谢.

If anyone has any idea of how to get the information I would appreciate it. Thanks.

推荐答案

您可以尝试使用htop.如果已安装自制软件,则可以通过"brew install htop"简单安装它,在安装完成后,在外壳上键入htop.

You can try htop. If you have homebrew installed, simple install it via "brew install htop", after the installation finished, type in htop on the shell.

这篇关于Mac OS X Shell实用程序,显示多核系统中各个CPU的使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆