- Apr 20, 2017 Before running any version of PoolMon on Windows XP or earlier versions of Windows, you must enable pool tagging. Pool tagging is permanently enabled on Windows Server 2003 and later versions of Windows. The pool tagging feature collects and calculates statistics about pool memory sorted by the tag value of the allocation.
- Nonpaged pool memory leak occurs in a Windows Server 2012 R2-based failover cluster. Content provided by Microsoft. Download the Windows Server 2012 R2 package now. Windows 8.1, and Windows Server 2012 R2 (2919355) installed in Windows Server 2012 R2. Registry information To apply this update, you don't have to make any changes to the.
I have a Windows 2012 R2 std. Server with a memory leak. Something tells me that the leak started after we installed Symantic Endpoint protection 12.1.5 - but I am not sure. I tried to disable Syma. Apr 16, 2018 PoolMon displays pool tag information within a command window. Use the arrow keys or the PAGE UP and PAGE DOWN keys to display all the tag information returned by the tool. Poolmon.exe is available in the Windows NT 4.0 Resource Kit and in the SupportTools folder of Windows 2000, Windows XP, and Windows Server 2003 CD-ROMs.
This topic includes the following examples of PoolMon use:
Example 1: Display and Sort PoolMon Output
Example 2: Display Driver Names
Example 3: Detect Memory Leakage
Example 4: Examine a Pool Memory Leak
Example 5: Monitor a Terminal Server Session
Example 1: Display and Sort PoolMon Output
This example describes various ways to configure the PoolMon display. By default, PoolMon displays all kernel memory allocations in alphanumeric order by tag value. You can modify the sort order of the display at the command line or while PoolMon is running.
The following command starts PoolMon:
The following command starts PoolMon and sorts the display by number of free operations:
While poolmon is running, you can use the run-time commands to change the display. For example, to sort the display by number of bytes used, press b. To sort by bytes per allocation, press m.
The following command starts PoolMon and displays only allocations from the nonpaged pool:
While PoolMon is running, press p to toggle through allocations from the paged pool, the nonpaged pool, or both.
To start PoolMon and display data for allocations with a particular tag, use the /i parameter. The following command displays allocations with the AfdB tag (the tag used by afd.sys for data buffers).
To exclude allocations with a particular tag, use the /x parameter. The following command displays all allocations that do not have the AfdB tag;
You can use an asterisk (*) and/or a question mark (?) to specify a set of tags with the same characters. The following command displays allocations that have pool tags beginning with Afd, the tag used by afd.sys;
A PoolMon startup command can include multiple /i and /x parameters. The following command displays allocations that have tags beginning with Aud and four-character tags beginning with Cc, except for allocations with the CcBc tag;
You can also sort the PoolMon display by the change in a value between updates. The /( parameter places PoolMon in sort-by-change mode.
The following command displays allocations with tags beginning with Afd, and sorts by the change in allocations. It uses the /a parameter to sort by number of allocations and the /) parameter to sort by the change in the number of allocations.
The /( parameter and the parentheses keys are toggle switches. When PoolMon is in sort-by-change mode, it interprets all sort commands as commands to sort by the change in the value. If you press a parenthesis key again, it sorts by the value.
Example 2: Display Driver Names
You can use the PoolMon /g parameter to display the names of Windows components and commonly used drivers that assign each pool tag. If you find a problem in allocations with a particular tag, this feature helps you identify the offending component or driver.
The components and drivers are listed in the Mapped_Driver column, the right-most column in the display. The data for the Mapped_Driver column comes from pooltag.txt, a file installed with PoolMon.
The following command displays memory allocated with tags that begin with NtF. (It uses the question mark character (?) as a wildcard.) The /g parameter adds the Mapped_Driver column.
The resulting display lists allocations with tags beginning in NtF. The rightmost column in the display, Mapped_Driver, shows that the memory was allocated by ntfs.sys, the driver for the NTFS file system. In this case, the display is even more specific, because pooltag.txt includes the source files for NTFS allocations.
Pooltag.txt is extensive, but it is not a complete list of all tags used in Windows. When a tag that appears in the display is not included in pooltag.txt, PoolMon displays 'Unknown driver' in the Mapped_Driver column for the tag. When this occurs, you can use the /c parameter to search the drivers on the local system and determine whether they assign the tag.
The following examples demonstrate this method.
The following command uses the /i parameter to list allocations with tags that end in MEM. The /g parameter adds the driver name to the display from the pooltag.txt file.
The resulting display lists the allocations with tags ending in MEM. However, because the MEM tags are not included in pooltag.txt, 'Unknown Driver' appears in the Mapped_Driver column in place of the driver name.
In this case, you can use the /c parameter to compile a list of local drivers and the tags they assign, and then display the names of local drivers in the Mapped_Driver column.
The following command starts PoolMon. It uses the /i parameter to list allocations with tags ending in MEM, and the /c parameter to display the local drivers that assign the tags.
If you do not specify a local tag file and PoolMon cannot find a localtag.txt file , it creates one, as shown in the following screen messages. (PoolMon cannot generate a local tag file on 64-bit versions of Windows.)
The resulting display, which uses the content from the newly created localtag.txt file, shows the local driver names in the Mapped_Driver column.
For a comprehensive driver name display, you can combine the /c and /g parameters in a command. (The order of parameters does not change the output.) The following command lists allocations for tags beginning with Ip. It uses the /c parameter, which uses the contents of the localtag.txt file in the Mapped_Driver column, and the /g parameter, which uses the contents of the pooltag.txt file in the Mapped_Driver column.
In the resulting display, the Mapped_Driver column contains data from both the localtag.txt and pooltag.txt files.
Example 3: Detect Memory Leakage
This example suggests a procedure for using PoolMon to detect a memory leak.
- Start PoolMon with the parameters /p /p (display only allocations from the paged pool) and /b (sort by the number of bytes).
- Let PoolMon run for a few hours. Because starting PoolMon changes the data, it must regain a steady state before the data is reliable.
- Save the information generated by PoolMon, either as a screen shot, or by copying it from the command window and pasting it into Notepad.
- Returning to PoolMon, press the p key twice to display only allocations from the nonpaged pool.
- Repeat steps 3 and 4 approximately every half-hour for at least two hours, switching between the paged and nonpaged pool displays each time.
- When data collection is complete, examine the Diff (allocation operations minus free operations) and Bytes (number of bytes allocated minus number of bytes freed) values for each tag, and note any that continually increase.
- Next, stop PoolMon, wait for a few hours, and then restart PoolMon.
- Examine the allocations that were increasing, and determine whether the bytes are now freed. The likely cause is allocations that have still not been freed or have continued to increase in size.
Example 4: Examine a Pool Memory Leak
The following example demonstrates using PoolMon to investigate a pool memory leak from a suspected printer driver. In this example, PoolMon displays data that Windows collects about memory allocations with the Dsrd tag.
Printer drivers assign the Drsd tag when they allocate Graphical Device Interface (GDI) objects and associated memory. If a printer driver has an object leak, the memory allocated with the Drsd tag also will leak.
Note Before running the steps in this example, ensure that the printer you are using will not be interrupted until you are finished. Otherwise, the results may be invalid.
At the command line, type the following:
This command directs PoolMon to display information for allocations with the Drsd tag. (Pool tags are case-sensitive, so be sure to type the command exactly as shown.)
Record the values in the Diff and Bytes columns. In the following sample display, the value of Diff is 21 and the number of Bytes is 17472.
Send a job to the printer, wait briefly for Windows to return to normal, and then record the values for the Diff and Bytes columns.
When the memory management for the printer driver is working properly, the value of Diff should return to its original value of 21 after printing. However, as the preceding output illustrates, the value of Diff rose to 27, and the number of Bytes rose to 22464. The difference between the initial and subsequent output means that six Drsd blocks, with a total of 4992 bytes, leaked during printing.
For More Information
If you believe you have identified a leaking driver, go to the Microsoft support website and search the Knowledge Base for relevant articles.
Example 5: Monitor a Terminal Server Session
This example shows several ways to display allocations from the Terminal Services session pools. It demonstrates the use of the /s command-line parameter, and the s, TSSessionID, and i running parameters.
The following command displays allocations from all of the Terminal Services session pools. In this example, the local computer, which is configured as a Terminal Server, is hosting the sessions, and client computers are using the Remote Desktop feature to connect to the host.
In response, PoolMon displays allocations from all session pools. Note the 'All sessions pool information' title in the header.
To see allocations from a particular session pool, type the session ID immediately after the /s parameter, as shown in the following command. This command displays session pool allocations for Terminal Services session 0.
In response, PoolMon displays allocations from the session pool for Terminal Services session 0. Note the 'Session 0 pool information' title in the header.
To help determine which drivers and components are allocating memory from the session pool, add the /g parameter, as shown in the following command. The /g parameter adds a Mapped_Driver column listing the Windows components and drivers that assign each tag.
You can also configure the Terminal Services session pool display while PoolMon is running. The following table shows a series of running commands, in the order in which they are typed, and the resulting PoolMon display.
The series begins with a command to start PoolMon. All other parameters are typed while PoolMon is running.
Key | Result | Description |
---|---|---|
s | Displays all session pools. | |
s | Displays the system pools. | The s parameter toggles the display between the system pools and the Terminal Services session pools. |
0 | Displays session 0 pool. | You can type a session ID while displaying the system pools. |
7 | Displays session 7 pool. | |
a | Displays pool allocations for session 7, sorted by number of allocations. | All standard running parameters are valid for session pool displays. |
0 | Displays allocations for session 0, sorted by number of allocations. | Session and sorting options are retained until changed. |
s | Displays the system pools. | |
s | Displays allocations for session 0, sorted by number of allocations. | Session option is retained. |
10ENTER | Displays Session 1 allocations, and then displays Session 0 allocations. | Without i, you can enter only session IDs 0 through 9. |
i | Prompts for a Terminal Server session ID. | |
10 | Displays Session 10 allocations. | |
i | Prompts for a Terminal Server session ID. | To display all session pools, press i and then press ENTER. |
ENTER | Displays all session pools. |
Only systems configured as a Terminal Server allocate memory from the session pool. If you use PoolMon to display the session pool on a computer that is not a Terminal Server, or if you type a session ID that does not exist on Windows, PoolMon does not display any allocations. Instead, it displays only the headings with general memory data.
The following command displays allocations from all Terminal Services session pools:
The following figure shows the PoolMon display that would result if the /s command were submitted to a computer running Windows XP that could not be configured as a Terminal Server:
-->PoolMon (poolmon.exe), the Memory Pool Monitor, displays data that the operating system collects about memory allocations from the system paged and nonpaged kernel pools, and the memory pools used for Terminal Services sessions. The data is grouped by pool allocation tag.
Driver developers and testers often use PoolMon to detect memory leaks when they create a new driver, change the driver code, or stress the driver. You can also use PoolMon in each stage of testing to view the driver's patterns of allocation and free operations, and to reveal how much pool memory the driver is using at any given time.
Download Poolmon.exe For Windows 2012
The version of PoolMon described in this document is included in the ToolsOther subdirectory of the Windows Driver Kit (WDK).
This topic includes:
To use PoolMon on Microsoft Windows XP and earlier systems, you must enable pool tagging. On Windows Server 2003 and later versions of Windows, pool tagging is permanently enabled. For more information, see 'Pool Tagging Requirement' in PoolMon Requirements.
Download Poolmon Windows 10
PoolMon can display the names of the Windows components and commonly used drivers that assign each pool tag. This feature uses data from pooltag.txt, a file installed with PoolMon and with the Debugging Tools for Windows packages. Occasionally, Microsoft updates this file. To check for updates, go to the Microsoft support website and search for 'pooltag.txt.'