当Windows变慢或死机时,我们通常会求助于任务管理器(Task Manager)来弄清楚发生了什么。如果您需要更好地了解Windows及其应用程序使用计算机资源的方式,资源监视器(Resource Monitor)(resmon.exe) 是完成任务的正确工具。信息简洁实时,带有图表并按(graphs and grouping)资源分组。您可以监控CPU、内存、磁盘和网络的使用情况。本教程展示了您需要了解的有关资源监视器(Resource Monitor)以及如何使用它的知识:
注意:(NOTE:)本指南适用于所有现代Windows版本:Windows 10、Windows 7 和Windows 8.1。由于资源监视器工具在所有(Resource Monitor)Windows版本中的外观和工作方式都相同,因此我们仅使用在Windows 10中截取的屏幕截图。
如何在Windows中启动(Windows)资源监视器(Resource Monitor)
启动适用于所有Windows版本的(Windows)Resource Monitor的一种简单方法是搜索其可执行文件 resmon(file resmon)或Resource Monitor的名称,然后单击或点击具有相同名称的搜索结果。(search result)
如果您想了解其他启动资源监视器(Resource Monitor)的方法,请阅读在Windows中启动(Windows)资源监视器(Resource Monitor)的11 种方法。
首先看一下资源监视器(Resource Monitor)。概览选项(Overview tab)卡。
当您打开资源监视器(Resource Monitor)(resmon) 时,应用程序窗口(application window)由概览选项卡(Overview tab)填充。概览选项卡(Overview tab)默认显示CPU 部分(CPU section)。您可以看到内存(Memory)、磁盘(Disk)和网络(Network)还有其他选项卡。在左侧面板的下部,有Disk、Network和Memory的折叠部分(不知道为什么顺序不同,没关系)。单击标题栏(title bar)右端的箭头可展开或关闭以下列表。
您可以将“资源监视器”窗口(Resource Monitor window)扩展到全屏大小,以便查看更多正在发生的事情。您还可以拖动左侧各个窗口的底部边框,以一次显示更多或更少的数据。
每个窗口都显示了当前正在使用资源的程序列表,右侧的图表为您提供了总数的直观表示。您可以通过单击或点击“视图”按钮(Views button)来更改图表的大小。默认视图(default view)是“大” 。
观察不断变化的列表和图表,看看哪些程序正在使用您的资源。我们发现有趣的是,opera.exe(它是Opera 网络浏览器(Opera web browser)的可执行文件)在我们的列表中多次出现(每个选项卡都有自己的可执行文件)。但是,将图表中的跳跃与准确的时间和一组(time and set)活动资源关联起来并不容易。
如何使用资源监视器监控(Resource Monitor)CPU 使用率(CPU usage)
让我们从探索CPU 选项卡(CPU tab)开始。如果将“资源监视器”窗口(Resource Monitor window)扩展到全屏大小(单击右上角的“平铺(right corner)”框(Tile box)) ,则更容易查看所有信息。单击(Click)CPU 选项卡(CPU tab),您会发现Processes 部分(Processes section)已展开。在此之下(Beneath),有Services、Associated Handles和Associated Modules的折叠窗口。列表中的进程可以正在运行(用黑色字体书写)或暂停(用蓝色字体书写)。
只有在您选择了正在运行的进程或服务(process or service)后,关联句柄和关联模块(Associated Modules)才会填充数据。
模块是帮助文件或程序,例如您选择的进程使用的动态链接库 ( DLL ) 文件。(DLL)句柄是指系统元素的指针,例如文件、注册表项、事件或所选进程使用的目录。
在右侧,您会看到滚动显示实时数据的CPU 使用率图表。(CPU usage)如果您有一个多核CPU,前两个图表显示(graphs show)所有核心的平均数据,而其他图表对于每个核心都是独立的。
让我们看一下流程部分(Processes section)。在左侧,您会看到一个进程列表、PID(进程标识符(process identifier))、进程的名称(有助于识别它是什么)、它的状态(运行或其他)、它的线程(一个核心元素(core element))大多数人不必关心的Windows进程)、 (Windows)CPU(任何时候的处理器使用情况(processor usage))和平均CPU(随时间平均的使用情况)。如果您无法阅读列标题(column heading)或内容,请抓住(s or content)标题栏中(title bar)每列的分隔符并将它们一一向右滑动,直到一切都可见。如果将光标悬停在每个列标题(column heading)上,则会弹出该列的说明。
如果您有任何未响应的进程,它们的名称将显示为红色。你可以用这个列表做什么?与许多Windows程序一样,资源监视器(Resource Monitor)允许您按升序或降序对列的内容进行排序。单击/点击平均 CPU 列表(Average CPU list),以使用顶部资源最多的进程对其进行排序。很有可能您不会看到任何大的资源消耗,因为大多数Windows程序都表现良好。但是,如果您发现计算机意外变慢,请查看此专栏。如果某事占用了大量CPU资源,您可能需要考虑将其关闭并重新启动。如果您不确定某物是什么,请右键单击(或点击并按住(tap and hold)) 并从列表中选择在线搜索。(Search online)这会使用您的默认浏览器和搜索引擎(default browser and search engine)为您进行搜索,您可以了解更多关于每个有时神秘的名称所代表的内容。
如果进程显示为红色并且其状态为“未响应”或类似的状态,您可以通过右键单击进程名称(process name)并选择“结束进程(End Process)”来关闭该进程。
警告:(WARNING:)除非您确定自己知道自己在做什么,否则不要使用“结束进程”。Windows会询问您是否确定要在进程关闭之前结束进程。有些进程是相互关联的,只关闭一个进程会对其他进程造成严重破坏。此外,您不希望结束对其操作至关重要的SYSTEM 进程或 svchost.exe 。(SYSTEM process or svchost.exe)结束流程时,请确保您知道它们是什么以及它们做什么。
服务(Services)部分类似于进程(Processes window)窗口。尝试在不折叠“进程”窗口(Processes window)的情况下展开它并查看一下。您会看到与“进程”窗口(Processes window)中的名称不同的名称列表,这些名称也会随着您的观察而改变。不同的是,这些东西都在运行Windows内部服务。
如果您选择一个或多个正在运行的进程,则“服务”窗口(Service window)仅显示与这些进程关联的服务。如果您右键单击(点击并按住(tap and hold))服务名称(service name),您会看到您可以选择停止服务、重新启动它(以防出现故障,但您需要使用它)或搜索有关它的更多信息在线的。
了解 Windows 如何使用内存
接下来,单击或点击“内存”选项卡(Memory tab)。在顶部,您会看到正在使用内存空间(memory space)的程序和进程的列表,在底部,您会看到一个条形图(bar graph),显示您的可用内存在哪里以及如何使用。这些列被标记为Hard Faults/sec、Commit、Working Set、Shareable和Private,每个列后跟 (KB) - 表示以千字节为单位的内存空间(memory space)。
您可能在Hard Faults/sec column只看到零(anything but zeroes)。术语“硬故障”有点误导 - 它并不是内存中的真正“故障”,它是Windows用完RAM空间并不得不使用交换文件(swap file)(Windows预留的硬盘空间(drive space)当物理内存耗尽时使用)。如果您确实看到很多硬故障,则表明您需要为计算机购买更多RAM。
提交列(Commit column)显示Windows默认为每个程序分配多少内存空间。(memory space) 该程序可能会或可能不会使用所有这些空间。如果您的列尚未排序,请单击此列以显示占用最多内存的内容。
工作集列(Working Set column)显示每个程序当前使用的内存量。
Shareable 列显示分配给每个程序的内存有多少可以由其他程序共享,Private 列(Private column)显示分配给每个程序的内存有多少只能由该程序使用。如果某个程序显示为使用太多内存,您可以决定关闭它。
内存使用(memory use)的条形图(bar graph)是不言自明的,资源监视器窗口(Resource Monitor window)右侧显示的图表也是如此。
什么是持有磁盘(Disk)?监控(Monitor)磁盘活动(Disk activity)
正如您可能猜到的那样,磁盘部分(Disk section)显示了正在使用硬盘资源的内容。如果您的硬盘驱动器指示灯(drive light)一直亮着并且您不确定原因,这可能会很有用。三个窗口标记为 Processes with Disk Activity、Disk Activity和Storage。将它们全部展开并查看。您可能还想扩展列标题,以便查看整个标题。在列标题中,“ B/sec ”代表“每秒字节数”。
您可以(或不应该)使用本节中的信息做很多事情。您可能会惊讶地看到您最喜欢的程序需要多少磁盘活动(disk activity),但同样,由于Windows程序通常表现良好,您很少会看到某些事情变得疯狂并让您的硬盘驱动器不断搅动,除了使用的程序下载文件。与其他资源监视器(Resource Monitor)部分一样,您可以右键单击(点击并按住(tap and hold))您不知道的任何名称,然后单击/点击在线搜索(Search online)以获得解释(这适用于具有磁盘活动的进程部分(Disk Activity section)只要)。您也可以从同一个右键菜单结束这些进程,但同样,除非您知道自己在做什么,否则不建议这样做。在Disk Activity 部分(Disk Activity section),右键单击名称没有任何作用,因此如果您对这些名称感到好奇,则必须自己查找它们。
底部部分Storage显示驱动器列表,其中包含有关Logical Disk、Physical Disk、Active Time、 Available Space、Total Space和Disk Queue Length的信息。
前几个是不言自明的。“磁盘队列长度(Disk Queue Length)”表示有多少磁盘空间(disk space)请求正在等待完成。除非您正在做一些不寻常的事情,或者您的软件行为严重异常,否则此列的数据大多为零。
什么在使用网络和互联网
最后一个选项卡是Network。当你打开这个时,你会看到 Processes with Network Activity、Network Activity、TCP Connections和 Listening Ports 部分。第一部分是唯一可以做任何事情的部分;其他内容仅供您参考,但您不能操纵或更改其中的任何内容。TCP 连接(TCP Connections)和侦听端口包含(Listening Ports contain)对更高级的用户有用的信息,具有良好的网络知识(networking knowledge),因此我们不会过多讨论它们。
查看带有网络活动的(Network Activity section)进程(Processes)部分。在这里,您可以找到正在运行的程序列表、连接到您的网络和 Internet 的程序。您可能不会在这里发现任何惊喜,因为它可能是依赖云存储的浏览器、即时消息和其他应用程序、网络连接(network connection)进程以及OneDrive 和 Dropbox等程序的列表。(OneDrive and Dropbox)如果名称太神秘,您可以使用右键菜单中出色的“在线搜索”命令来查看它们是什么。(Search Online)
您可以在此选项卡中做的一件有用的事情是仅选择您感兴趣的一个进程或一组进程,并且自动过滤下部分中的数据,以便您可以看到Network Activity、TCP Connections 或 Listening Ports(TCP Connections or Listening Ports),仅用于您所做的选择。
右侧的图表是不言自明的,显示了您的网络活动(network activity)、TCP连接和本地连接(area connection)活动的概览。
您(Did)是否发现您的资源在Windows中是如何使用的?
资源监视器(Resource Monitor)(resmon) 是了解Windows引擎盖的绝佳方式。它使您可以查看幕后发生的事情,并停止导致问题的活动。只要您谨慎行事,您就可以了解很多有关计算机内部正在发生的事情,并了解Windows 10、Windows 8.1 和Windows 7的工作原理。
How to use the Resource Monitor in Windows
When Windows slows down or freezes, we usually tυrn to the Task Manager to figure out what іs going on. If yоu need а better understanding of the way Windows and its apps use the resources of your computer, Resource Monitоr (reѕmon.exe) is the right tool for the task. The information is concise and real-time wіth graphs and grouping by resources. You can monitor the use of the CPU, memory, disk, and network. This tυtorial shows what you need to know about Resource Monitоr and how to use it:
NOTE: This guide works for all modern Windows versions: Windows 10, Windows 7 and Windows 8.1. Because the Resource Monitor tool looks and works the same in all Windows versions, we use screenshots taken only in Windows 10.
How to start the Resource Monitor in Windows
An easy way to start Resource Monitor that works in all Windows versions is to search for the name of its executable file resmon or for Resource Monitor, and click or tap the search result with the same name.
If you want to know other methods to start Resource Monitor, read 11 ways to start Resource Monitor in Windows.
First look at the Resource Monitor. The Overview tab.
When you open the Resource Monitor (resmon), the application window is filled by the Overview tab. The Overview tab shows the CPU section by default. You can see that there are other tabs for Memory, Disk, and Network. In the lower part of the left-hand panel, there are collapsed sections for Disk, Network, and Memory (no idea why the order is different, and it doesn't matter). Clicking on the arrow at the right end of the title bar expands or closes the below list.
You can expand the Resource Monitor window to full-screen size so you can see more of what's going on. You can also drag the bottom border of the individual windows on the left to show more or less data at a time.
Each window shows a list of programs that are currently using resources, and the graphs on the right give you a visual representation of the totals. You can change the size of the graphs, by clicking or tapping on the Views button. The default view is "Large."
Watch the changing lists and graphs and see which programs are using your resources. We found it interesting that opera.exe (which is the executable of the Opera web browser) shows up multiple times on our list (each tab with its own executable). However, it's not easy to correlate a jump in the graph with an exact time and set of active resources.
How to monitor the CPU usage with Resource Monitor
Let's start by exploring the CPU tab. It is easier to see all the information if you expand the Resource Monitor window to full-screen size (click on the Tile box in the upper right corner). Click on the CPU tab, and you find the Processes section expanded. Beneath that, there are collapsed windows for Services, Associated Handles, and Associated Modules. The processes in the list can either be running (written with black font) or suspended (written with blue).
Associated Handles and Associated Modules get populated with data only after you select a running process or service.
Modules are helper files or programs, such as the dynamic-link library (DLL) files used by the process you select. Handles are pointers that refer to system elements such as files, registry keys, events, or directories used by the selected process.
On the right, you see graphs of CPU usage that scroll to show you your data in real time. If you have a multicore CPU, the first two graphs show average data for all cores, while the others are independent for each core.
Let's look at the Processes section. On the left, you see a list of processes, the PID (process identifier), the name of the process (which is helpful for identifying what it is), its status (running, or otherwise), its threads (a core element of Windows processes that most people don't have to concern themselves with), CPU (processor usage at any one moment), and average CPU (usage averaged over time). If you cannot read the column headings or content, grab each column's divider in the title bar and slide them to the right one by one until everything is visible. If you hover the cursor over each column heading, a description of that column pops up.
If you have any processes that are not responding, their names show up in red. What can you do with this list? Like many Windows programs, Resource Monitor lets you sort the contents of the columns in ascending or descending order. Click/tap on the Average CPU list, to sort it with the processes using the most resources at the top. Chances are good you do not see any big resource hogs since most Windows programs are well behaved. However, if you find your computer slowing down unexpectedly, take a look at this column. If something is taking up a lot of CPU resources, you may want to consider shutting it down and restarting it. If you are not sure what something is, right-click (or tap and hold) on the name and choose to Search online from the list. That pulls up a search for you with your default browser and search engine, and you can find out more about what each of those sometimes-cryptic names represents.
If a process shows up in red and its status is "Not Responding" or something similar, you can shut down that process by right-clicking on the process name and choosing "End Process."
WARNING: Do not use "End process" unless you are sure you know what you're doing. Windows asks you if you are sure you want to end the process before it shuts it down. Some processes are interlinked and shutting down only one can wreak havoc on the others. Also, you do not want to end the SYSTEM process or svchost.exe that are critical to its operation. When ending processes, make sure you know what they are and what they do.
The Services section is similar to the Processes window. Try expanding it without collapsing the Processes window and take a look. You see a list of names that are different from the names in the Processes window, which also change as you watch. The difference is that these things are running Windows internal services.
If you select one or more of the running processes, the Service window shows only the services associated with those processes. If you right-click (tap and hold) on a service name, you see that you have the option to stop the service, restart it (in case it is malfunctioning, but you need to use it) or search for more information about it online.
Learn how Windows uses the Memory
Next, click or tap on the Memory tab. At the top, you see a list of the programs and processes that are using memory space, and at the bottom, a bar graph showing you where and how your available memory is in use. The columns are labeled Hard Faults/sec, Commit, Working Set, Shareable, and Private, each followed by (KB) - meaning memory space in kilobytes.
You probably do not see anything but zeroes in the Hard Faults/sec column. The term "hard fault" is somewhat misleading - it's not really a "fault" in the memory, it's an instance where Windows ran out of space in RAM and had to use the swap file (hard drive space that's set aside by Windows to be used when physical memory runs out). If you do see a lot of hard faults, it's a good indication that you need to buy some more RAM for your computer.
The Commit column shows you how much memory space Windows allocates for each program by default. The program may or may not be using all of that space. If your columns are not already sorted, click on this one to show you what's using up the most memory.
The Working Set column shows you how much memory each program is using at the moment.
The Shareable column shows you how much of the memory allocated to each program can be shared by other programs, and the Private column shows how much of the memory allocated to each program can be used only by that program. If a program shows up as using way too much memory, you can decide to close it.
The bar graph of memory use is self-explanatory, and so are the graphs that are shown on the right side of the Resource Monitor window.
What is holding the Disk? Monitor the Disk activity
The Disk section, as you may guess, shows you what is using hard drive resources. It can be useful if your hard drive light stays on and you are not sure why. There are three windows labeled Processes with Disk Activity, Disk Activity, and Storage. Expand them all and take a look. You probably also want to expand the column headings so you can see the whole title. In the column headings, "B/sec" stands for "bytes per second."
There is not a lot you can (or should) do with the information in this section. You might be surprised to see how much disk activity your favorite programs require, but again, since Windows programs are usually well behaved, it would be uncommon for you to see something going crazy and making your hard drive keep churning away, except for programs used to download files. As with the other Resource Monitor sections, you can right-click (tap and hold) on any name you do not know, and click/tap Search online to get an explanation (this works in the Processes with Disk Activity section only). You can also end those processes from the same right-click menu, but again, that is not recommended unless you know what you are doing. In the Disk Activity section, right-clicking on the names does nothing, so if you are curious about those, you have to look them up on your own.
The bottom section, Storage, shows a list of your drives with information on Logical Disk, Physical Disk, Active Time, Available Space, Total Space, and Disk Queue Length.
The first few are self-explanatory. "Disk Queue Length" is an indication of how many requests for disk space are waiting to be fulfilled. Unless you are doing something out of the ordinary or you have software that's seriously misbehaving, this column's data is mostly zeroes.
What is using the network and the internet
The final tab is Network. When you open this one, you see sections for Processes with Network Activity, Network Activity, TCP Connections, and Listening Ports. The first section is the only one you can do anything with; the others are for your information, but you cannot manipulate or change anything in them. TCP Connections and Listening Ports contain information that is useful to more advanced users, with good networking knowledge, so we won't be talking much about them.
Take a look at the Processes with Network Activity section. Here you find a list of programs you are running, programs that are connecting to your network and the internet. You probably do not find any surprises here, since it is likely to be a list of browsers, instant messaging and other apps, network connection processes and programs like OneDrive and Dropbox that rely on cloud storage. If the names are too cryptic, you can use that excellent "Search Online" command from the right-click menu to see what they are.
One useful thing that you can do in this tab is to select only one process or a group of processes you are interested in, and the data in the lower sections are automatically filtered, so that you can see the Network Activity, TCP Connections or Listening Ports, only for the selection you made.
The graphs on the right are self-explanatory and show an overview of your network activity, TCP connections, and activity over your local area connection.
Did you find out how your resources are used in Windows?
The Resource Monitor (resmon) is an excellent way to have a look under the hood of Windows. It lets you look at what is going on behind the scenes, and stop the activity that is causing problems. As long as you proceed with caution, you can learn a lot about what is happening inside your computer and appreciate how Windows 10, Windows 8.1 and Windows 7 are designed to work.