#include "../proc/procps.h"
#include "../proc/devname.h"
#include "../proc/escape.h"
+#include "../proc/numa.h"
#include "common.h"
return snprintf(outbuf, COLWID, "%d", pp->processor);
}
+static int pr_numa(char *restrict const outbuf, const proc_t *restrict const pp){
+ static int first = 1;
+ if (first) { numa_init(); first = 0; } // we'll keep this dependency local
+ return snprintf(outbuf, COLWID, "%d", numa_node_of_cpu(pp->processor));
+}
+
static int pr_rss(char *restrict const outbuf, const proc_t *restrict const pp){
return snprintf(outbuf, COLWID, "%lu", pp->vm_rss);
}
{"nsignals", "NSIGS", pr_nop, sr_nop, 5, 0, DEC, AN|RIGHT}, /*nsigs*/
{"nsigs", "NSIGS", pr_nop, sr_nop, 5, 0, BSD, AN|RIGHT}, /*nsignals*/
{"nswap", "NSWAP", pr_nop, sr_nop, 5, 0, XXX, AN|RIGHT},
+{"numa", "NUMA", pr_numa, sr_nop, 4, 0, XXX, AN|RIGHT},
{"nvcsw", "VCSW", pr_nop, sr_nop, 5, 0, XXX, AN|RIGHT},
{"nwchan", "WCHAN", pr_nwchan, sr_nop, 6, 0, XXX, TO|RIGHT},
{"opri", "PRI", pr_opri, sr_priority, 3, 0, SUN, TO|RIGHT},
.\" Quick hack conversion by Albert Cahalan, 1998.
.\" Licensed under version 2 of the Gnu General Public License.
.\"
-.TH PS 1 "August 2015" "procps-ng" "User Commands"
+.TH PS 1 "May 2017" "procps-ng" "User Commands"
.\"
.\" To render this page:
.\" groff -t -b -man -X -P-resolution -P100 -Tps ps.1 &
.BR thcount ).
T}
+numa NUMA T{
+The node assocated with the most recently used processor.
+A -1 means that NUMA information is unavailable.
+T}
+
nwchan WCHAN T{
address of the kernel function where the process is sleeping (use
.B wchan