The numastat tool is provided by the numactl package, and displays memory statistics (such as allocation hits and misses) for processes and the operating system on a per-NUMA-node basis. The default tracking categories for the
numastat command are outlined as follows:
- The number of pages that were successfully allocated to this node.
- The number of pages that were allocated on this node because of low memory on the intended node. Each
numa_missevent has a corresponding
numa_foreignevent on another node.
- The number of pages initially intended for this node that were allocated to another node instead. Each
numa_foreignevent has a corresponding
numa_missevent on another node.
- The number of interleave policy pages successfully allocated to this node.
- The number of pages successfully allocated on this node, by a process on this node.
- The number of pages allocated on this node, by a process on another node.
Supplying any of the following options changes the displayed units to megabytes of memory (rounded to two decimal places), and changes other specific numastat behaviors as described below.
- Horizontally condenses the displayed table of information. This is useful on systems with a large number of NUMA nodes, but column width and inter-column spacing are somewhat unpredictable. When this option is used, the amount of memory is rounded to the nearest megabyte.
- Displays system-wide memory usage information on a per-node basis, similar to the information found in
- Displays the same information as the original numastat command (
other_node), with an updated format, using megabytes as the unit of measurement.
- -p pattern
- Displays per-node memory information for the specified pattern. If the value for pattern is comprised of digits, numastat assumes that it is a numerical process identifier. Otherwise, numastat searches process command lines for the specified pattern.Command line arguments entered after the value of the
-poption are assumed to be additional patterns for which to filter. Additional patterns expand, rather than narrow, the filter.
- Sorts the displayed data in descending order so that the biggest memory consumers (according to the total column) are listed first.Optionally, you can specify a node, and the table will be sorted according to the node column. When using this option, the node value must follow the
-soption immediately, as shown here:
numastat -s2Do not include white space between the option and its value.
- Displays more verbose information. Namely, process information for multiple processes will display detailed information for each process.
- Displays numastat version information.
- Omits table rows and columns with only zero values from the displayed information. Note that some near-zero values that are rounded to zero for display purposes will not be omitted from the displayed output.