如何检查OS X的terminal进程?
我想查看在OS X中运行的进程的信息。在terminal中运行ps只会列出打开的terminal窗口。 我如何看到正在运行的所有进程? 
假设我正在运行networking浏览器,terminal和文本编辑器。 我想看看文本编辑器和网页浏览器的信息。
 您可以使用top它将显示在您的OSX上运行的一切 
 运行ps -e做到这一点。 在这里find答案。 
 使用top和ps是好的,但我发现使用htop比Mac OS X使用的标准工具更好,更清晰。 我最喜欢的用途是在运行时按下T键以在树视图中查看进程(请参见屏幕截图)。 显示哪些进程相互依赖于其他进程。 
  
 
你可以用Homebrew来安装它:
 brew install htop 
 如果您的系统上安装了Xcode和相关工具(如git ,并且您想从官方源代码仓库安装最新的开发代码,请按照以下步骤操作。 
 首先从htop GitHub仓库克隆源代码: 
 git clone git@github.com:hishamhm/htop.git 
现在进入版本库目录:
 cd htop 
 运行autogen.sh : 
 ./autogen.sh 
 运行这个configure命令: 
 ./configure 
  configure过程完成后,运行make : 
 make 
 最后通过运行sudo make install安装它: 
 sudo make install 
 试试ps -ef 。  man ps会给你所有的select。 
  -A Display information about other users' processes, including those without controlling terminals. -e Identical to -A. -f Display the uid, pid, parent pid, recent CPU usage, process start time, controlling tty, elapsed CPU usage, and the associated command. If the -u option is also used, display the user name rather then the numeric uid. When -o or -O is used to add to the display following -f, the command field is not truncated as severely as it is in other formats. 
 尝试top命令。 这是一个交互式命令,将显示正在运行的进程。 
 您也可以使用Apple的“Activity Monitor”应用程序(位于/Applications/Utilities/ )。 
它提供了一个非常好的GUI。 您可以看到所有正在运行的进程,通过用户进行筛选,获取关于它们(CPU,内存,networking等)的扩展信息,监视它们等。
 可能是你最好的select,除非你想坚持terminal(在这种情况下,阅读top或ps手册,因为这些命令有一堆选项)。 
 按cpu使用sorting: top -o cpu