1numastat(8)                     Administration                     numastat(8)
2
3
4

NAME

6       numastat  -  Show per-NUMA-node memory statistics for processes and the
7       operating system
8

SYNTAX

10       numastat
11
12       numastat [-V]
13
14       numastat [<PID>|<pattern>...]
15
16       numastat [-c] [-m] [-n] [-p  <PID>|<pattern>]  [-s[<node>]]  [-v]  [-z]
17       [<PID>|<pattern>...]
18

DESCRIPTION

20       numastat with no command options or arguments at all, displays per-node
21       NUMA hit and miss system statistics from the kernel  memory  allocator.
22       This default numastat behavior is strictly compatible with the previous
23       long-standing numastat perl script, written by Andi Kleen.  The default
24       numastat  statistics  shows per-node numbers (in units of pages of mem‐
25       ory) in these categories:
26
27       numa_hit is memory successfully allocated on this node as intended.
28
29       numa_miss is memory allocated on this node despite the process  prefer‐
30       ring  some different node. Each numa_miss has a numa_foreign on another
31       node.
32
33       numa_foreign is memory intended for this node, but  actually  allocated
34       on  some  different node.  Each numa_foreign has a numa_miss on another
35       node.
36
37       interleave_hit is interleaved memory  successfully  allocated  on  this
38       node as intended.
39
40       local_node is memory allocated on this node while a process was running
41       on it.
42
43       other_node is memory allocated on this node while a process was running
44       on some other node.
45
46       Any  supplied  options or arguments with the numastat command will sig‐
47       nificantly change both the content  and  the  format  of  the  display.
48       Specified  options  will  cause display units to change to megabytes of
49       memory, and  will  change  other  specific  behaviors  of  numastat  as
50       described below.
51

OPTIONS

53       -c     Minimize  table  display  width  by dynamically shrinking column
54              widths based on data contents.  With  this  option,  amounts  of
55              memory  will be rounded to the nearest megabyte (rather than the
56              usual display with two decimal places).  Column width and inter-
57              column  spacing will be somewhat unpredictable with this option,
58              but the more dense display will be very useful on  systems  with
59              many NUMA nodes.
60
61       -m     Show  the  meminfo-like  system-wide  memory  usage information.
62              This option produces a per-node breakdown of memory usage infor‐
63              mation similar to that found in /proc/meminfo.
64
65       -n     Show  the original numastat statistics info.  This will show the
66              same information as the default numastat behavior but the  units
67              will  be megabytes of memory, and there will be other formatting
68              and layout changes versus the original numastat behavior.
69
70       -p <PID> or <pattern>
71              Show per-node memory allocation information  for  the  specified
72              PID  or  pattern.   If  the  -p  argument  is only digits, it is
73              assumed to be a numerical PID.  If the argument  characters  are
74              not  only digits, it is assumed to be a text fragment pattern to
75              search for in process command lines.  For example,  numastat  -p
76              qemu  will  attempt  to  find and show information for processes
77              with "qemu" in the command line.   Any  command  line  arguments
78              remaining  after  numastat  option flag processing is completed,
79              are assumed to be additional <PID> or <pattern>  process  speci‐
80              fiers.   In this sense, the -p option flag is optional: numastat
81              qemu is equivalent to numastat -p qemu
82
83       -s[<node>]
84              Sort the table data in descending order before displaying it, so
85              the  biggest  memory consumers are listed first.  With no speci‐
86              fied <node>, the table will be sorted by the total  column.   If
87              the  optional  <node>  argument  is  supplied,  the data will be
88              sorted by the <node> column.  Note that <node> must  follow  the
89              -s  immediately with no intermediate white space (e.g., numastat
90              -s2). Because -s can allow an optional argument, it must  always
91              be  the  last  option  character  in a compound option character
92              string. For example, instead of numastat  -msc  (which  probably
93              will not work as you expect), use numastat -mcs
94
95       -v     Make some reports more verbose.  In particular, process informa‐
96              tion for multiple processes will  display  detailed  information
97              for each process.  Normally when per-node information for multi‐
98              ple processes is displayed, only the total lines are shown.
99
100       -V     Display numastat version information and exit.
101
102       -z     Skip display of table rows and columns  of  only  zero  valuess.
103              This  can  be used to greatly reduce the amount of uninteresting
104              zero data on systems with many NUMA nodes.  Note that when  rows
105              or  columns  of zeros are still displayed with this option, that
106              probably means there is at least one value in the row or  column
107              that is actually non-zero, but rounded to zero for display.
108

NOTES

110       numastat attempts to fold each table display so it will be conveniently
111       readable on the output terminal.  Normally a terminal width of 80 char‐
112       acters  is  assumed.   When  the  resize command is available, numastat
113       attempts to dynamically determine and fine tune the  output  tty  width
114       from resize output.  If numastat output is not to a tty, very long out‐
115       put lines can be  produced,  depending  on  how  many  NUMA  nodes  are
116       present.   In  all  cases, output width can be explicitly specified via
117       the  NUMASTAT_WIDTH  environment   variable.    For   example,   NUMAS‐
118       TAT_WIDTH=100   numastat.  On systems with many NUMA nodes, numastat -c
119       -z .... can be very helpful to selectively reduce the  amount  of  dis‐
120       played information.
121

ENVIRONMENT VARIABLES

123       NUMASTAT_WIDTH
124

FILES

126       /proc/*/numa_maps
127       /sys/devices/system/node/node*/meminfo
128       /sys/devices/system/node/node*/numastat
129

EXAMPLES

131       numastat -c -z -m -n
132       numastat -czs libvirt kvm qemu
133       watch -n1 numastat
134       watch -n1 --differences=cumulative numastat
135

AUTHORS

137       The  original numastat perl script was written circa 2003 by Andi Kleen
138       <andi.kleen@intel.com>.  The current numastat program  was  written  in
139       2012  by  Bill Gray <bgray@redhat.com> to be compatible by default with
140       the original, and to add options  to  display  per-node  system  memory
141       usage and per-node process memory allocation.
142

SEE ALSO

144       numactl(8), set_mempolicy(2), numa(3)
145
146
147
148Bill Gray                            1.0.0                         numastat(8)
Impressum