MacOS’s Activity Monitor will give you a list of all the apps you’re running, which is useful for closing down CPU-hungry processes. But it also throws in a bunch of system process, some of which may not be safe to quit. Here’s how to tell the difference.
MacOS的活动监视器将为您提供所有正在运行的应用程序的列表,这对于关闭需要CPU的进程非常有用。 但是它也会引发很多系统过程,其中一些过程可能不安全地退出。 这是区分差异的方法。
(Who Are All These Users?)
First, you should look at who owns the process. Processes in macOS (and any other Unix-like operating system, including Linux) have owners, tying each process to the user account that started the process. And while you will recognize your user account, there’s a lot of other users on your computer, most of which are managed by the system.
首先,您应该查看谁拥有流程。 macOS(以及任何其他类似Unix的操作系统 ,包括Linux)中的进程具有所有者,将每个进程与启动该进程的用户帐户绑定在一起。 尽管您会识别用户帐户,但计算机上还有许多其他用户,其中大多数是由系统管理的。
You can see here, on a standard installation of macOS, there are over 250 users managed by the system, most of which start with an underscore:
您可以在此处看到,在标准安装的macOS上,系统管理着250多个用户,其中大多数以下划线开头:
Macs have so many user accounts because of the way permissions work in macOS, and each user has specific permissions. For example, _dock would have permission to access files related to the dock and not much else. This keeps your system more secure by keeping low-level system processes in their own containers.
由于权限在macOS中的工作方式,因此Mac有许多用户帐户,并且每个用户都有特定的权限。 例如,_dock有权访问与扩展坞相关的文件,而没有其他权限。 通过将低级系统进程保留在其自己的容器中,可以使您的系统更安全。
Important: Since most of these are purely system processes, it’s best never to quit any process whose owner starts with an underscore.
重要说明:由于其中大多数都是纯系统进程,因此最好永远不要退出所有者以下划线开头的任何进程。
It’s probably safe to close all processes under your user account name since most of them will automatically restart if they’re needed. However, you shouldn’t go too crazy closing everything to save on system performance, as the vast majority of the processes running on your machine are idle. It’s a lot better to leave them there for when they’re needed, instead of spending extra resources having to open them up again.
以您的用户帐户名关闭所有进程可能是安全的,因为如果需要,大多数进程将自动重新启动。 但是,您不应太疯狂地关闭所有内容以节省系统性能,因为计算机上运行的绝大多数进程都是空闲的。 最好将它们留在需要的地方,而不是花费额外的资源来再次打开它们。
Processes with an icon next to their name denote apps, which are usually safe to close. You can sort by “% CPU” to view the apps taking up the most resources:
名称旁边带有图标的进程表示应用程序,通常可以安全地关闭它们。 您可以按“%CPU”排序以查看占用最多资源的应用程序:
Some of these, like Google Chrome, will have helper processes used to improve performance. You’ll want to quit apps like Chrome from the Force Quit menu (Option-Command-Escape) rather than from Activity monitor.
其中一些工具(例如Google Chrome)将使用帮助程序来提高性能。 您需要从“强制退出”菜单(Option-Command-Escape)而不是“活动”监视器中退出Chrome之类的应用程序。
One thing to note is that if the app has either of the two icons seen below, you should be more careful when closing it:
需要注意的一件事是,如果应用程序具有下面显示的两个图标之一,则在关闭它时应格外小心:
The icons to watch out for are a white sheet with a pencil, brush, and ruler in the shape of an “A,” or a shield.
要注意的图标是一张白色的纸,上面有铅笔,刷子和尺子,形状为“ A”或盾牌。
The first is the default icon for an app without one, which may mean it’s a background process that doesn’t need a user-facing icon. The latter is an icon specific to user-level Apple processes, like Siri, Finder, and the Dock.
第一个是没有一个应用程序的默认图标,这可能意味着它是一个后台进程,不需要面向用户的图标。 后者是特定于用户级Apple流程的图标,例如Siri,Finder和Dock。
(What is “root”?)
Next up is root, which is the user account with the most system permissions. This is a weirder one because most of the root account’s processes system processes, but a few things you launch will launch as root—particularly things that need to access low-level system resources. These are harder to spot, as you’ll need to know what you’re looking for:
接下来是root,这是拥有最多系统权限的用户帐户。 这很奇怪,因为大多数root帐户都处理系统进程,但是您启动的一些操作将以root身份启动,尤其是需要访问低级系统资源的操作。 这些很难发现,因为您需要知道要查找的内容:
Here’s an example: ckb-next is a third party driver for my Corsair USB Mouse, so I know that ckb-next-daemon, running as root, is a helper process for that app. Were I to close it, my mouse would stop working. Generally, if you see something you recognize running as root, it might be safe to close, but most of the processes in this category are system things you shouldn’t touch.
这是一个示例:ckb-next是我的Corsair USB鼠标的第三方驱动程序,因此我知道以root身份运行的ckb-next-daemon是该应用程序的帮助程序。 如果我将其关闭,鼠标将停止工作。 通常,如果您看到某些东西以root身份运行,则可以安全地关闭它,但是此类别中的大多数过程都是系统性的,您不应接触。
(Using Filters)
Under the View menu in the top menu bar, you can change which processes will show up. You can choose to view only processes that have windows, which will show the same list as the Force Quit menu. You also can see processes started by you, by the system, and ones that are active or have gone inactive.
在顶部菜单栏的“查看”菜单下,您可以更改将显示哪些进程。 您可以选择仅查看具有窗口的进程,这些窗口将显示与“强制退出”菜单相同的列表。 您还可以查看由您启动,由系统启动的进程以及处于活动状态或已变为非活动状态的进程。
The useful part of these filter views is that you can then sort by “% CPU” on top of that. For example, you could view the longest running system processes by choosing “System Processes” as the filter and “CPU Time” as the sort.
这些过滤器视图的有用部分是,您可以在此之上按“%CPU”进行排序。 例如,您可以通过选择“系统进程”作为过滤器并选择“ CPU时间”作为排序来查看运行时间最长的系统进程。
Whatever you choose to quit, you can’t really harm your Mac by doing so, as whatever damage you may do can be fixed with a simple restart. In fact, the best way to clean up the process list is to restart your computer, which will clear out some unnecessary things. Look for apps that start running right as you log in and uninstall the ones you don’t need.
无论您选择退出哪种方式,都无法真正损害Mac,因为只要重新启动就可以解决可能造成的任何损害。 实际上,清理进程列表的最佳方法是重新启动计算机,这将清除一些不必要的内容。 查找可以在登录时立即开始运行的应用程序,并卸载不需要的应用程序。
翻译自: https://www.howtogeek.com/406573/which-processes-in-activity-monitor-can-you-safely-quit/