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
52       Memory usage information reflects the resident pages on the system.
53

OPTIONS

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

NOTES

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

ENVIRONMENT VARIABLES

125       NUMASTAT_WIDTH
126

FILES

128       /proc/*/numa_maps
129       /sys/devices/system/node/node*/meminfo
130       /sys/devices/system/node/node*/numastat
131

EXAMPLES

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

AUTHORS

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

SEE ALSO

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