top: now includes that NUMA node field display support
[ this patch has been adapted from the newlib branch ] Reference(s): https://gitlab.com/procps-ng/procps/issues/58 Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
1a2ec0390a
commit
1422c219ac
97
top/top.1
97
top/top.1
@ -69,7 +69,7 @@
|
|||||||
.
|
.
|
||||||
.\" Document /////////////////////////////////////////////////////////////
|
.\" Document /////////////////////////////////////////////////////////////
|
||||||
.\" ----------------------------------------------------------------------
|
.\" ----------------------------------------------------------------------
|
||||||
.TH TOP 1 "March 2017" "procps-ng" "User Commands"
|
.TH TOP 1 "May 2017" "procps-ng" "User Commands"
|
||||||
.\" ----------------------------------------------------------------------
|
.\" ----------------------------------------------------------------------
|
||||||
|
|
||||||
.\" ----------------------------------------------------------------------
|
.\" ----------------------------------------------------------------------
|
||||||
@ -766,19 +766,26 @@ Zero in this field simply means priority will not be adjusted in determining
|
|||||||
a task's dispatch-ability.
|
a task's dispatch-ability.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
14.\fB OOMa \*(Em Out of Memory Adjustment Factor \fR
|
14.\fB NU \*(Em Last known NUMA node \fR
|
||||||
|
A number representing the NUMA node associated with the last used processor (`P').
|
||||||
|
When -1 is displayed it means that NUMA information is not available.
|
||||||
|
|
||||||
|
\*(XC `'2' and `3' \*(CIs for additional NUMA provisions affecting the \*(SA.
|
||||||
|
|
||||||
|
.TP 4
|
||||||
|
15.\fB OOMa \*(Em Out of Memory Adjustment Factor \fR
|
||||||
The value, ranging from -1000 to +1000, added to the current out of memory
|
The value, ranging from -1000 to +1000, added to the current out of memory
|
||||||
score (OOMs) which is then used to determine which task to kill when memory
|
score (OOMs) which is then used to determine which task to kill when memory
|
||||||
is exhausted.
|
is exhausted.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
15.\fB OOMs \*(Em Out of Memory Score \fR
|
16.\fB OOMs \*(Em Out of Memory Score \fR
|
||||||
The value, ranging from 0 to +1000, used to select task(s) to kill when memory
|
The value, ranging from 0 to +1000, used to select task(s) to kill when memory
|
||||||
is exhausted.
|
is exhausted.
|
||||||
Zero translates to `never kill' whereas 1000 means `always kill'.
|
Zero translates to `never kill' whereas 1000 means `always kill'.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
16.\fB P \*(Em Last used \*(PU (SMP) \fR
|
17.\fB P \*(Em Last used \*(PU (SMP) \fR
|
||||||
A number representing the last used processor.
|
A number representing the last used processor.
|
||||||
In a true SMP environment this will likely change frequently since the kernel
|
In a true SMP environment this will likely change frequently since the kernel
|
||||||
intentionally uses weak affinity.
|
intentionally uses weak affinity.
|
||||||
@ -787,7 +794,7 @@ processes to change \*(PUs more often (because of the extra demand for
|
|||||||
\*(Pu time).
|
\*(Pu time).
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
17.\fB PGRP \*(Em Process Group Id \fR
|
18.\fB PGRP \*(Em Process Group Id \fR
|
||||||
Every process is member of a unique process group which is used for
|
Every process is member of a unique process group which is used for
|
||||||
distribution of signals and by terminals to arbitrate requests for their
|
distribution of signals and by terminals to arbitrate requests for their
|
||||||
input and output.
|
input and output.
|
||||||
@ -797,7 +804,7 @@ By convention, this value equals the process ID (\*(Xa PID) of the first
|
|||||||
member of a process group, called the process group leader.
|
member of a process group, called the process group leader.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
18.\fB PID \*(Em Process Id \fR
|
19.\fB PID \*(Em Process Id \fR
|
||||||
The task's unique process ID, which periodically wraps, though never
|
The task's unique process ID, which periodically wraps, though never
|
||||||
restarting at zero.
|
restarting at zero.
|
||||||
In kernel terms, it is a dispatchable entity defined by a task_struct.
|
In kernel terms, it is a dispatchable entity defined by a task_struct.
|
||||||
@ -808,11 +815,11 @@ a thread group ID for the thread group leader (\*(Xa TGID);
|
|||||||
and a TTY process group ID for the process group leader (\*(Xa TPGID).
|
and a TTY process group ID for the process group leader (\*(Xa TPGID).
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
19.\fB PPID \*(Em Parent Process Id \fR
|
20.\fB PPID \*(Em Parent Process Id \fR
|
||||||
The process ID (pid) of a task's parent.
|
The process ID (pid) of a task's parent.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
20.\fB PR \*(Em Priority \fR
|
21.\fB PR \*(Em Priority \fR
|
||||||
The scheduling priority of the task.
|
The scheduling priority of the task.
|
||||||
If you see `rt' in this field, it means the task is running
|
If you see `rt' in this field, it means the task is running
|
||||||
under real time scheduling priority.
|
under real time scheduling priority.
|
||||||
@ -822,7 +829,7 @@ the operating itself was not preemptible.
|
|||||||
And while the 2.6 kernel can be made mostly preemptible, it is not always so.
|
And while the 2.6 kernel can be made mostly preemptible, it is not always so.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
21.\fB RES \*(Em Resident Memory Size (KiB) \fR
|
22.\fB RES \*(Em Resident Memory Size (KiB) \fR
|
||||||
A subset of the virtual address space (VIRT) representing the non-swapped
|
A subset of the virtual address space (VIRT) representing the non-swapped
|
||||||
\*(MP a task is currently using.
|
\*(MP a task is currently using.
|
||||||
It is also the sum of the RSan, RSfd and RSsh fields.
|
It is also the sum of the RSan, RSfd and RSsh fields.
|
||||||
@ -837,35 +844,35 @@ modified, act as a dedicated \*(MS and thus will never impact SWAP.
|
|||||||
\*(XX.
|
\*(XX.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
22.\fB RSan \*(Em Resident Anonymous Memory Size (KiB) \fR
|
23.\fB RSan \*(Em Resident Anonymous Memory Size (KiB) \fR
|
||||||
A subset of resident memory (RES) representing private pages not
|
A subset of resident memory (RES) representing private pages not
|
||||||
mapped to a file.
|
mapped to a file.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
23.\fB RSfd \*(Em Resident File-Backed Memory Size (KiB) \fR
|
24.\fB RSfd \*(Em Resident File-Backed Memory Size (KiB) \fR
|
||||||
A subset of resident memory (RES) representing the implicitly shared
|
A subset of resident memory (RES) representing the implicitly shared
|
||||||
pages supporting program images and shared libraries.
|
pages supporting program images and shared libraries.
|
||||||
It also includes explicit file mappings, both private and shared.
|
It also includes explicit file mappings, both private and shared.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
24.\fB RSlk \*(Em Resident Locked Memory Size (KiB) \fR
|
25.\fB RSlk \*(Em Resident Locked Memory Size (KiB) \fR
|
||||||
A subset of resident memory (RES) which cannot be swapped out.
|
A subset of resident memory (RES) which cannot be swapped out.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
25.\fB RSsh \*(Em Resident Shared Memory Size (KiB) \fR
|
26.\fB RSsh \*(Em Resident Shared Memory Size (KiB) \fR
|
||||||
A subset of resident memory (RES) representing the explicitly shared
|
A subset of resident memory (RES) representing the explicitly shared
|
||||||
anonymous shm*/mmap pages.
|
anonymous shm*/mmap pages.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
26.\fB RUID \*(Em Real User Id \fR
|
27.\fB RUID \*(Em Real User Id \fR
|
||||||
The\fI real\fR user ID.
|
The\fI real\fR user ID.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
27.\fB RUSER \*(Em Real User Name \fR
|
28.\fB RUSER \*(Em Real User Name \fR
|
||||||
The\fI real\fR user name.
|
The\fI real\fR user name.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
28.\fB S \*(Em Process Status \fR
|
29.\fB S \*(Em Process Status \fR
|
||||||
The status of the task which can be one of:
|
The status of the task which can be one of:
|
||||||
\fBD\fR = uninterruptible sleep
|
\fBD\fR = uninterruptible sleep
|
||||||
\fBR\fR = running
|
\fBR\fR = running
|
||||||
@ -880,7 +887,7 @@ Even without a true SMP machine, you may see numerous tasks in this state
|
|||||||
depending on \*(We's delay interval and nice value.
|
depending on \*(We's delay interval and nice value.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
29.\fB SHR \*(Em Shared Memory Size (KiB) \fR
|
30.\fB SHR \*(Em Shared Memory Size (KiB) \fR
|
||||||
A subset of resident memory (RES) that may be used by other processes.
|
A subset of resident memory (RES) that may be used by other processes.
|
||||||
It will include shared anonymous pages and shared file-backed pages.
|
It will include shared anonymous pages and shared file-backed pages.
|
||||||
It also includes private pages mapped to files representing
|
It also includes private pages mapped to files representing
|
||||||
@ -889,7 +896,7 @@ program images and shared libraries.
|
|||||||
\*(XX.
|
\*(XX.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
30.\fB SID \*(Em Session Id \fR
|
31.\fB SID \*(Em Session Id \fR
|
||||||
A session is a collection of process groups (\*(Xa PGRP),
|
A session is a collection of process groups (\*(Xa PGRP),
|
||||||
usually established by the login shell.
|
usually established by the login shell.
|
||||||
A newly forked process joins the session of its creator.
|
A newly forked process joins the session of its creator.
|
||||||
@ -898,11 +905,11 @@ member of the session, called the session leader, which is usually the
|
|||||||
login shell.
|
login shell.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
31.\fB SUID \*(Em Saved User Id \fR
|
32.\fB SUID \*(Em Saved User Id \fR
|
||||||
The\fI saved\fR user ID.
|
The\fI saved\fR user ID.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
32.\fB SUPGIDS \*(Em Supplementary Group IDs \fR
|
33.\fB SUPGIDS \*(Em Supplementary Group IDs \fR
|
||||||
The IDs of any supplementary group(s) established at login or
|
The IDs of any supplementary group(s) established at login or
|
||||||
inherited from a task's parent.
|
inherited from a task's parent.
|
||||||
They are displayed in a comma delimited list.
|
They are displayed in a comma delimited list.
|
||||||
@ -915,7 +922,7 @@ Even so, such variable width fields could still suffer truncation.
|
|||||||
any truncated data.
|
any truncated data.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
33.\fB SUPGRPS \*(Em Supplementary Group Names \fR
|
34.\fB SUPGRPS \*(Em Supplementary Group Names \fR
|
||||||
The names of any supplementary group(s) established at login or
|
The names of any supplementary group(s) established at login or
|
||||||
inherited from a task's parent.
|
inherited from a task's parent.
|
||||||
They are displayed in a comma delimited list.
|
They are displayed in a comma delimited list.
|
||||||
@ -928,24 +935,24 @@ Even so, such variable width fields could still suffer truncation.
|
|||||||
any truncated data.
|
any truncated data.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
34.\fB SUSER \*(Em Saved User Name \fR
|
35.\fB SUSER \*(Em Saved User Name \fR
|
||||||
The\fI saved\fR user name.
|
The\fI saved\fR user name.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
35.\fB SWAP \*(Em Swapped Size (KiB) \fR
|
36.\fB SWAP \*(Em Swapped Size (KiB) \fR
|
||||||
The formerly resident portion of a task's address space written
|
The formerly resident portion of a task's address space written
|
||||||
to the \*(MS when \*(MP becomes over committed.
|
to the \*(MS when \*(MP becomes over committed.
|
||||||
|
|
||||||
\*(XX.
|
\*(XX.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
36.\fB TGID \*(Em Thread Group Id \fR
|
37.\fB TGID \*(Em Thread Group Id \fR
|
||||||
The ID of the thread group to which a task belongs.
|
The ID of the thread group to which a task belongs.
|
||||||
It is the PID of the thread group leader.
|
It is the PID of the thread group leader.
|
||||||
In kernel terms, it represents those tasks that share an mm_struct.
|
In kernel terms, it represents those tasks that share an mm_struct.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
37.\fB TIME \*(Em \*(PU Time \fR
|
38.\fB TIME \*(Em \*(PU Time \fR
|
||||||
Total \*(PU time the task has used since it started.
|
Total \*(PU time the task has used since it started.
|
||||||
When Cumulative mode is \*O, each process is listed with the \*(Pu
|
When Cumulative mode is \*O, each process is listed with the \*(Pu
|
||||||
time that it and its dead children have used.
|
time that it and its dead children have used.
|
||||||
@ -953,19 +960,19 @@ You toggle Cumulative mode with `S', which is both a \*(CO and an \*(CI.
|
|||||||
\*(XC `S' \*(CI for additional information regarding this mode.
|
\*(XC `S' \*(CI for additional information regarding this mode.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
38.\fB TIME+ \*(Em \*(PU Time, hundredths \fR
|
39.\fB TIME+ \*(Em \*(PU Time, hundredths \fR
|
||||||
The same as TIME, but reflecting more granularity through hundredths
|
The same as TIME, but reflecting more granularity through hundredths
|
||||||
of a second.
|
of a second.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
39.\fB TPGID \*(Em Tty Process Group Id \fR
|
40.\fB TPGID \*(Em Tty Process Group Id \fR
|
||||||
The process group ID of the foreground process for the connected tty,
|
The process group ID of the foreground process for the connected tty,
|
||||||
or \-1 if a process is not connected to a terminal.
|
or \-1 if a process is not connected to a terminal.
|
||||||
By convention, this value equals the process ID (\*(Xa PID) of the
|
By convention, this value equals the process ID (\*(Xa PID) of the
|
||||||
process group leader (\*(Xa PGRP).
|
process group leader (\*(Xa PGRP).
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
40.\fB TTY \*(Em Controlling Tty \fR
|
41.\fB TTY \*(Em Controlling Tty \fR
|
||||||
The name of the controlling terminal.
|
The name of the controlling terminal.
|
||||||
This is usually the device (serial port, pty, etc.) from which the
|
This is usually the device (serial port, pty, etc.) from which the
|
||||||
process was started, and which it uses for input or output.
|
process was started, and which it uses for input or output.
|
||||||
@ -973,22 +980,22 @@ However, a task need not be associated with a terminal, in which case
|
|||||||
you'll see `?' displayed.
|
you'll see `?' displayed.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
41.\fB UID \*(Em User Id \fR
|
42.\fB UID \*(Em User Id \fR
|
||||||
The\fI effective\fR user ID of the task's owner.
|
The\fI effective\fR user ID of the task's owner.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
42.\fB USED \*(Em Memory in Use (KiB) \fR
|
43.\fB USED \*(Em Memory in Use (KiB) \fR
|
||||||
This field represents the non-swapped \*(MP a task is using (RES) plus
|
This field represents the non-swapped \*(MP a task is using (RES) plus
|
||||||
the swapped out portion of its address space (SWAP).
|
the swapped out portion of its address space (SWAP).
|
||||||
|
|
||||||
\*(XX.
|
\*(XX.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
43.\fB USER \*(Em User Name \fR
|
44.\fB USER \*(Em User Name \fR
|
||||||
The\fI effective\fR user name of the task's owner.
|
The\fI effective\fR user name of the task's owner.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
44.\fB VIRT \*(Em Virtual Memory Size (KiB) \fR
|
45.\fB VIRT \*(Em Virtual Memory Size (KiB) \fR
|
||||||
The total amount of \*(MV used by the task.
|
The total amount of \*(MV used by the task.
|
||||||
It includes all code, data and shared libraries plus pages that have been
|
It includes all code, data and shared libraries plus pages that have been
|
||||||
swapped out and pages that have been mapped but not used.
|
swapped out and pages that have been mapped but not used.
|
||||||
@ -996,13 +1003,13 @@ swapped out and pages that have been mapped but not used.
|
|||||||
\*(XX.
|
\*(XX.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
45.\fB WCHAN \*(Em Sleeping in Function \fR
|
46.\fB WCHAN \*(Em Sleeping in Function \fR
|
||||||
This field will show the name of the kernel function in which the task
|
This field will show the name of the kernel function in which the task
|
||||||
is currently sleeping.
|
is currently sleeping.
|
||||||
Running tasks will display a dash (`\-') in this column.
|
Running tasks will display a dash (`\-') in this column.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
46.\fB nDRT \*(Em Dirty Pages Count \fR
|
47.\fB nDRT \*(Em Dirty Pages Count \fR
|
||||||
The number of pages that have been modified since they were last
|
The number of pages that have been modified since they were last
|
||||||
written to \*(AS.
|
written to \*(AS.
|
||||||
Dirty pages must be written to \*(AS before the corresponding physical
|
Dirty pages must be written to \*(AS before the corresponding physical
|
||||||
@ -1011,7 +1018,7 @@ memory location can be used for some other virtual page.
|
|||||||
This field was deprecated with linux 2.6 and is always zero.
|
This field was deprecated with linux 2.6 and is always zero.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
47.\fB nMaj \*(Em Major Page Fault Count \fR
|
48.\fB nMaj \*(Em Major Page Fault Count \fR
|
||||||
The number of\fB major\fR page faults that have occurred for a task.
|
The number of\fB major\fR page faults that have occurred for a task.
|
||||||
A page fault occurs when a process attempts to read from or write to a
|
A page fault occurs when a process attempts to read from or write to a
|
||||||
virtual page that is not currently present in its address space.
|
virtual page that is not currently present in its address space.
|
||||||
@ -1019,7 +1026,7 @@ A major page fault is when \*(AS access is involved in making that
|
|||||||
page available.
|
page available.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
48.\fB nMin \*(Em Minor Page Fault count \fR
|
49.\fB nMin \*(Em Minor Page Fault count \fR
|
||||||
The number of\fB minor\fR page faults that have occurred for a task.
|
The number of\fB minor\fR page faults that have occurred for a task.
|
||||||
A page fault occurs when a process attempts to read from or write to a
|
A page fault occurs when a process attempts to read from or write to a
|
||||||
virtual page that is not currently present in its address space.
|
virtual page that is not currently present in its address space.
|
||||||
@ -1027,50 +1034,50 @@ A minor page fault does not involve \*(AS access in making that
|
|||||||
page available.
|
page available.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
49.\fB nTH \*(Em Number of Threads \fR
|
50.\fB nTH \*(Em Number of Threads \fR
|
||||||
The number of threads associated with a process.
|
The number of threads associated with a process.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
50.\fB nsIPC \*(Em IPC namespace \fR
|
51.\fB nsIPC \*(Em IPC namespace \fR
|
||||||
The Inode of the namespace used to isolate interprocess communication (IPC)
|
The Inode of the namespace used to isolate interprocess communication (IPC)
|
||||||
resources such as System V IPC objects and POSIX message queues.
|
resources such as System V IPC objects and POSIX message queues.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
51.\fB nsMNT \*(Em MNT namespace \fR
|
52.\fB nsMNT \*(Em MNT namespace \fR
|
||||||
The Inode of the namespace used to isolate filesystem mount points thus
|
The Inode of the namespace used to isolate filesystem mount points thus
|
||||||
offering different views of the filesystem hierarchy.
|
offering different views of the filesystem hierarchy.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
52.\fB nsNET \*(Em NET namespace \fR
|
53.\fB nsNET \*(Em NET namespace \fR
|
||||||
The Inode of the namespace used to isolate resources such as network devices,
|
The Inode of the namespace used to isolate resources such as network devices,
|
||||||
IP addresses, IP routing, port numbers, etc.
|
IP addresses, IP routing, port numbers, etc.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
53.\fB nsPID \*(Em PID namespace \fR
|
54.\fB nsPID \*(Em PID namespace \fR
|
||||||
The Inode of the namespace used to isolate process ID numbers
|
The Inode of the namespace used to isolate process ID numbers
|
||||||
meaning they need not remain unique.
|
meaning they need not remain unique.
|
||||||
Thus, each such namespace could have its own `init/systemd' (PID #1) to
|
Thus, each such namespace could have its own `init/systemd' (PID #1) to
|
||||||
manage various initialization tasks and reap orphaned child processes.
|
manage various initialization tasks and reap orphaned child processes.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
54.\fB nsUSER \*(Em USER namespace \fR
|
55.\fB nsUSER \*(Em USER namespace \fR
|
||||||
The Inode of the namespace used to isolate the user and group ID numbers.
|
The Inode of the namespace used to isolate the user and group ID numbers.
|
||||||
Thus, a process could have a normal unprivileged user ID outside a user
|
Thus, a process could have a normal unprivileged user ID outside a user
|
||||||
namespace while having a user ID of 0, with full root privileges, inside
|
namespace while having a user ID of 0, with full root privileges, inside
|
||||||
that namespace.
|
that namespace.
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
55.\fB nsUTS \*(Em UTS namespace \fR
|
56.\fB nsUTS \*(Em UTS namespace \fR
|
||||||
The Inode of the namespace used to isolate hostname and NIS domain name.
|
The Inode of the namespace used to isolate hostname and NIS domain name.
|
||||||
UTS simply means "UNIX Time-sharing System".
|
UTS simply means "UNIX Time-sharing System".
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
56.\fB vMj \*(Em Major Page Fault Count Delta\fR
|
57.\fB vMj \*(Em Major Page Fault Count Delta\fR
|
||||||
The number of\fB major\fR page faults that have occurred since the
|
The number of\fB major\fR page faults that have occurred since the
|
||||||
last update (see nMaj).
|
last update (see nMaj).
|
||||||
|
|
||||||
.TP 4
|
.TP 4
|
||||||
57.\fB vMn \*(Em Minor Page Fault Count Delta\fR
|
58.\fB vMn \*(Em Minor Page Fault Count Delta\fR
|
||||||
The number of\fB minor\fR page faults that have occurred since the
|
The number of\fB minor\fR page faults that have occurred since the
|
||||||
last update (see nMin).
|
last update (see nMin).
|
||||||
|
|
||||||
|
90
top/top.c
90
top/top.c
@ -20,9 +20,6 @@
|
|||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
#ifndef NUMA_DISABLE
|
|
||||||
#include <dlfcn.h>
|
|
||||||
#endif
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
@ -51,6 +48,7 @@
|
|||||||
#include "../include/nls.h"
|
#include "../include/nls.h"
|
||||||
|
|
||||||
#include "../proc/devname.h"
|
#include "../proc/devname.h"
|
||||||
|
#include "../proc/numa.h"
|
||||||
#include "../proc/procps.h"
|
#include "../proc/procps.h"
|
||||||
#include "../proc/readproc.h"
|
#include "../proc/readproc.h"
|
||||||
#include "../proc/sig.h"
|
#include "../proc/sig.h"
|
||||||
@ -214,27 +212,12 @@ static int Autox_array [EU_MAXPFLGS],
|
|||||||
static char Scaled_sfxtab[] = { 'k', 'm', 'g', 't', 'p', 'e', 0 };
|
static char Scaled_sfxtab[] = { 'k', 'm', 'g', 't', 'p', 'e', 0 };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Support for NUMA Node display, node expansion/targeting and
|
/* Support for NUMA Node display and node expansion/targeting */
|
||||||
run-time dynamic linking with libnuma.so treated as a plugin */
|
|
||||||
#ifndef OFF_STDERROR
|
#ifndef OFF_STDERROR
|
||||||
static int Stderr_save = -1;
|
static int Stderr_save = -1;
|
||||||
#endif
|
#endif
|
||||||
static int Numa_node_tot;
|
static int Numa_node_tot;
|
||||||
static int Numa_node_sel = -1;
|
static int Numa_node_sel = -1;
|
||||||
#ifndef NUMA_DISABLE
|
|
||||||
static void *Libnuma_handle;
|
|
||||||
#if defined(PRETEND_NUMA) || defined(PRETEND8CPUS)
|
|
||||||
static int Numa_max_node(void) { return 3; }
|
|
||||||
#ifndef OFF_NUMASKIP
|
|
||||||
static int Numa_node_of_cpu(int num) { return (1 == (num % 4)) ? 0 : (num % 4); }
|
|
||||||
#else
|
|
||||||
static int Numa_node_of_cpu(int num) { return (num % 4); }
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
static int (*Numa_max_node)(void);
|
|
||||||
static int (*Numa_node_of_cpu)(int num);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Support for Graphing of the View_STATES ('t') and View_MEMORY ('m')
|
/* Support for Graphing of the View_STATES ('t') and View_MEMORY ('m')
|
||||||
commands -- which are now both 4-way toggles */
|
commands -- which are now both 4-way toggles */
|
||||||
@ -272,6 +255,13 @@ SCB_NUMx(GID, egid)
|
|||||||
SCB_STRS(GRP, egroup)
|
SCB_STRS(GRP, egroup)
|
||||||
SCB_STRS(LXC, lxcname)
|
SCB_STRS(LXC, lxcname)
|
||||||
SCB_NUMx(NCE, nice)
|
SCB_NUMx(NCE, nice)
|
||||||
|
static int SCB_NAME(NMA) (const proc_t **P, const proc_t **Q) {
|
||||||
|
/* this is a terrible cost to pay for sorting on numa nodes, but it's
|
||||||
|
necessary if we're to avoid ABI breakage via changes to the proc_t */
|
||||||
|
int p = numa_node_of_cpu((*P)->processor);
|
||||||
|
int q = numa_node_of_cpu((*Q)->processor);
|
||||||
|
return Frame_srtflg * ( q - p );
|
||||||
|
}
|
||||||
SCB_NUM1(NS1, ns[IPCNS])
|
SCB_NUM1(NS1, ns[IPCNS])
|
||||||
SCB_NUM1(NS2, ns[MNTNS])
|
SCB_NUM1(NS2, ns[MNTNS])
|
||||||
SCB_NUM1(NS3, ns[NETNS])
|
SCB_NUM1(NS3, ns[NETNS])
|
||||||
@ -553,18 +543,7 @@ static void bye_bye (const char *str) {
|
|||||||
#endif // end: ATEOJ_RPTHSH
|
#endif // end: ATEOJ_RPTHSH
|
||||||
#endif // end: OFF_HST_HASH
|
#endif // end: OFF_HST_HASH
|
||||||
|
|
||||||
#ifndef NUMA_DISABLE
|
numa_uninit();
|
||||||
/* note: we'll skip a dlcose() to avoid the following libnuma memory
|
|
||||||
* leak which is triggered after a call to numa_node_of_cpu():
|
|
||||||
* ==1234== LEAK SUMMARY:
|
|
||||||
* ==1234== definitely lost: 512 bytes in 1 blocks
|
|
||||||
* ==1234== indirectly lost: 48 bytes in 2 blocks
|
|
||||||
* ==1234== ...
|
|
||||||
* [ thanks very much libnuma, for all the pain you've caused ]
|
|
||||||
*/
|
|
||||||
// if (Libnuma_handle)
|
|
||||||
// dlclose(Libnuma_handle);
|
|
||||||
#endif
|
|
||||||
if (str) {
|
if (str) {
|
||||||
fputs(str, stderr);
|
fputs(str, stderr);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
@ -1792,7 +1771,8 @@ static FLD_t Fieldstab[] = {
|
|||||||
{ 6, SK_Kb, A_right, SF(RZF), L_status },
|
{ 6, SK_Kb, A_right, SF(RZF), L_status },
|
||||||
{ 6, SK_Kb, A_right, SF(RZL), L_status },
|
{ 6, SK_Kb, A_right, SF(RZL), L_status },
|
||||||
{ 6, SK_Kb, A_right, SF(RZS), L_status },
|
{ 6, SK_Kb, A_right, SF(RZS), L_status },
|
||||||
{ -1, -1, A_left, SF(CGN), L_CGROUP }
|
{ -1, -1, A_left, SF(CGN), L_CGROUP },
|
||||||
|
{ 0, -1, A_right, SF(NMA), L_stat },
|
||||||
#undef SF
|
#undef SF
|
||||||
#undef A_left
|
#undef A_left
|
||||||
#undef A_right
|
#undef A_right
|
||||||
@ -2286,6 +2266,10 @@ static void zap_fieldstab (void) {
|
|||||||
if (5 < digits) error_exit(N_txt(FAIL_widecpu_txt));
|
if (5 < digits) error_exit(N_txt(FAIL_widecpu_txt));
|
||||||
Fieldstab[EU_CPN].width = digits;
|
Fieldstab[EU_CPN].width = digits;
|
||||||
}
|
}
|
||||||
|
Fieldstab[EU_NMA].width = 2;
|
||||||
|
if (2 < (digits = (unsigned)snprintf(buf, sizeof(buf), "%u", (unsigned)Numa_node_tot))) {
|
||||||
|
Fieldstab[EU_NMA].width = digits;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef BOOST_PERCNT
|
#ifdef BOOST_PERCNT
|
||||||
Cpu_pmax = 99.9;
|
Cpu_pmax = 99.9;
|
||||||
@ -2359,9 +2343,7 @@ static void cpus_refresh (void) {
|
|||||||
static char *buf;
|
static char *buf;
|
||||||
CPU_t *sum_ptr; // avoid gcc subscript bloat
|
CPU_t *sum_ptr; // avoid gcc subscript bloat
|
||||||
int i, num, tot_read;
|
int i, num, tot_read;
|
||||||
#ifndef NUMA_DISABLE
|
|
||||||
int node;
|
int node;
|
||||||
#endif
|
|
||||||
char *bp;
|
char *bp;
|
||||||
|
|
||||||
/*** hotplug_acclimated ***/
|
/*** hotplug_acclimated ***/
|
||||||
@ -2421,11 +2403,9 @@ static void cpus_refresh (void) {
|
|||||||
((sum_ptr->cur.tot - sum_ptr->sav.tot) / smp_num_cpus) / (100 / TICS_EDGE);
|
((sum_ptr->cur.tot - sum_ptr->sav.tot) / smp_num_cpus) / (100 / TICS_EDGE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NUMA_DISABLE
|
|
||||||
// forget all of the prior node statistics (maybe)
|
// forget all of the prior node statistics (maybe)
|
||||||
if (CHKw(Curwin, View_CPUNOD))
|
if (CHKw(Curwin, View_CPUNOD) && Numa_node_tot)
|
||||||
memset(sum_ptr + 1, 0, Numa_node_tot * sizeof(CPU_t));
|
memset(sum_ptr + 1, 0, Numa_node_tot * sizeof(CPU_t));
|
||||||
#endif
|
|
||||||
|
|
||||||
// now value each separate cpu's tics...
|
// now value each separate cpu's tics...
|
||||||
for (i = 0; i < sumSLOT; i++) {
|
for (i = 0; i < sumSLOT; i++) {
|
||||||
@ -2449,12 +2429,11 @@ static void cpus_refresh (void) {
|
|||||||
#ifdef PRETEND8CPUS
|
#ifdef PRETEND8CPUS
|
||||||
cpu_ptr->id = i;
|
cpu_ptr->id = i;
|
||||||
#endif
|
#endif
|
||||||
#ifndef NUMA_DISABLE
|
|
||||||
/* henceforth, with just a little more arithmetic we can avoid
|
/* henceforth, with just a little more arithmetic we can avoid
|
||||||
maintaining *any* node stats unless they're actually needed */
|
maintaining *any* node stats unless they're actually needed */
|
||||||
if (CHKw(Curwin, View_CPUNOD)
|
if (CHKw(Curwin, View_CPUNOD)
|
||||||
&& Numa_node_tot
|
&& Numa_node_tot
|
||||||
&& -1 < (node = Numa_node_of_cpu(cpu_ptr->id))) {
|
&& -1 < (node = numa_node_of_cpu(cpu_ptr->id))) {
|
||||||
// use our own pointer to avoid gcc subscript bloat
|
// use our own pointer to avoid gcc subscript bloat
|
||||||
CPU_t *nod_ptr = sum_ptr + 1 + node;
|
CPU_t *nod_ptr = sum_ptr + 1 + node;
|
||||||
nod_ptr->cur.u += cpu_ptr->cur.u; nod_ptr->sav.u += cpu_ptr->sav.u;
|
nod_ptr->cur.u += cpu_ptr->cur.u; nod_ptr->sav.u += cpu_ptr->sav.u;
|
||||||
@ -2475,7 +2454,6 @@ static void cpus_refresh (void) {
|
|||||||
nod_ptr->id = -1;
|
nod_ptr->id = -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} // end: for each cpu
|
} // end: for each cpu
|
||||||
|
|
||||||
Cpu_faux_tot = i; // tolerate cpus taken offline
|
Cpu_faux_tot = i; // tolerate cpus taken offline
|
||||||
@ -2702,11 +2680,8 @@ static void sysinfo_refresh (int forced) {
|
|||||||
#ifndef PRETEND8CPUS
|
#ifndef PRETEND8CPUS
|
||||||
cpuinfo();
|
cpuinfo();
|
||||||
Cpu_faux_tot = smp_num_cpus;
|
Cpu_faux_tot = smp_num_cpus;
|
||||||
#ifndef NUMA_DISABLE
|
|
||||||
if (Libnuma_handle)
|
|
||||||
Numa_node_tot = Numa_max_node() + 1;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
Numa_node_tot = numa_max_node() + 1;
|
||||||
sav_secs = cur_secs;
|
sav_secs = cur_secs;
|
||||||
}
|
}
|
||||||
} // end: sysinfo_refresh
|
} // end: sysinfo_refresh
|
||||||
@ -3294,26 +3269,8 @@ static void before (char *me) {
|
|||||||
memcpy(HHash_two, HHash_nul, sizeof(HHash_nul));
|
memcpy(HHash_two, HHash_nul, sizeof(HHash_nul));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NUMA_DISABLE
|
numa_init();
|
||||||
#if defined(PRETEND_NUMA) || defined(PRETEND8CPUS)
|
Numa_node_tot = numa_max_node() + 1;
|
||||||
Numa_node_tot = Numa_max_node() + 1;
|
|
||||||
#else
|
|
||||||
// we'll try for the most recent version, then a version we know works...
|
|
||||||
if ((Libnuma_handle = dlopen("libnuma.so", RTLD_LAZY))
|
|
||||||
|| (Libnuma_handle = dlopen("libnuma.so.1", RTLD_LAZY))) {
|
|
||||||
Numa_max_node = dlsym(Libnuma_handle, "numa_max_node");
|
|
||||||
Numa_node_of_cpu = dlsym(Libnuma_handle, "numa_node_of_cpu");
|
|
||||||
if (Numa_max_node && Numa_node_of_cpu)
|
|
||||||
Numa_node_tot = Numa_max_node() + 1;
|
|
||||||
else {
|
|
||||||
// this dlclose is safe - we've yet to call numa_node_of_cpu
|
|
||||||
// ( there's one other dlclose which has now been disabled )
|
|
||||||
dlclose(Libnuma_handle);
|
|
||||||
Libnuma_handle = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SIGRTMAX // not available on hurd, maybe others too
|
#ifndef SIGRTMAX // not available on hurd, maybe others too
|
||||||
#define SIGRTMAX 32
|
#define SIGRTMAX 32
|
||||||
@ -5178,7 +5135,6 @@ static void summary_show (void) {
|
|||||||
|
|
||||||
cpus_refresh();
|
cpus_refresh();
|
||||||
|
|
||||||
#ifndef NUMA_DISABLE
|
|
||||||
if (!Numa_node_tot) goto numa_nope;
|
if (!Numa_node_tot) goto numa_nope;
|
||||||
|
|
||||||
if (CHKw(w, View_CPUNOD)) {
|
if (CHKw(w, View_CPUNOD)) {
|
||||||
@ -5216,7 +5172,6 @@ static void summary_show (void) {
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
numa_nope:
|
numa_nope:
|
||||||
#endif
|
|
||||||
if (CHKw(w, View_CPUSUM)) {
|
if (CHKw(w, View_CPUSUM)) {
|
||||||
// display just the 1st /proc/stat line
|
// display just the 1st /proc/stat line
|
||||||
summary_hlp(&Cpu_tics[Cpu_faux_tot], N_txt(WORD_allcpus_txt));
|
summary_hlp(&Cpu_tics[Cpu_faux_tot], N_txt(WORD_allcpus_txt));
|
||||||
@ -5436,6 +5391,9 @@ static const char *task_show (const WIN_t *q, const proc_t *p) {
|
|||||||
case EU_NCE:
|
case EU_NCE:
|
||||||
cp = make_num(p->nice, W, Jn, AUTOX_NO, 1);
|
cp = make_num(p->nice, W, Jn, AUTOX_NO, 1);
|
||||||
break;
|
break;
|
||||||
|
case EU_NMA:
|
||||||
|
cp = make_num(numa_node_of_cpu(p->processor), W, Jn, AUTOX_NO, 0);
|
||||||
|
break;
|
||||||
case EU_NS1: // IPCNS
|
case EU_NS1: // IPCNS
|
||||||
case EU_NS2: // MNTNS
|
case EU_NS2: // MNTNS
|
||||||
case EU_NS3: // NETNS
|
case EU_NS3: // NETNS
|
||||||
|
11
top/top.h
11
top/top.h
@ -25,7 +25,6 @@
|
|||||||
/* Defines represented in configure.ac ----------------------------- */
|
/* Defines represented in configure.ac ----------------------------- */
|
||||||
//#define BOOST_MEMORY /* enable extra precision for mem fields */
|
//#define BOOST_MEMORY /* enable extra precision for mem fields */
|
||||||
//#define BOOST_PERCNT /* enable extra precision for 2 % fields */
|
//#define BOOST_PERCNT /* enable extra precision for 2 % fields */
|
||||||
//#define NUMA_DISABLE /* disable summary area NUMA/Nodes display */
|
|
||||||
//#define ORIG_TOPDEFS /* with no rcfile retain original defaults */
|
//#define ORIG_TOPDEFS /* with no rcfile retain original defaults */
|
||||||
//#define SIGNALS_LESS /* favor reduced signal load over response */
|
//#define SIGNALS_LESS /* favor reduced signal load over response */
|
||||||
|
|
||||||
@ -49,7 +48,6 @@
|
|||||||
//#define PRETEND2_5_X /* pretend we're linux 2.5.x (for IO-wait) */
|
//#define PRETEND2_5_X /* pretend we're linux 2.5.x (for IO-wait) */
|
||||||
//#define PRETEND8CPUS /* pretend we're smp with 8 ticsers (sic) */
|
//#define PRETEND8CPUS /* pretend we're smp with 8 ticsers (sic) */
|
||||||
//#define PRETENDNOCAP /* use a terminal without essential caps */
|
//#define PRETENDNOCAP /* use a terminal without essential caps */
|
||||||
//#define PRETEND_NUMA /* pretend 4 (or 3 w/o OFF_NUMASKIP) Nodes */
|
|
||||||
//#define QUICK_GRAPHS /* use fast algorithm, accept +2% distort */
|
//#define QUICK_GRAPHS /* use fast algorithm, accept +2% distort */
|
||||||
//#define RCFILE_NOERR /* rcfile errs silently default, vs. fatal */
|
//#define RCFILE_NOERR /* rcfile errs silently default, vs. fatal */
|
||||||
//#define RECALL_FIXED /* don't reorder saved strings if recalled */
|
//#define RECALL_FIXED /* don't reorder saved strings if recalled */
|
||||||
@ -206,6 +204,7 @@ enum pflag {
|
|||||||
EU_LXC,
|
EU_LXC,
|
||||||
EU_RZA, EU_RZF, EU_RZL, EU_RZS,
|
EU_RZA, EU_RZF, EU_RZL, EU_RZS,
|
||||||
EU_CGN,
|
EU_CGN,
|
||||||
|
EU_NMA,
|
||||||
#ifdef USE_X_COLHDR
|
#ifdef USE_X_COLHDR
|
||||||
// not really pflags, used with tbl indexing
|
// not really pflags, used with tbl indexing
|
||||||
EU_MAXPFLGS
|
EU_MAXPFLGS
|
||||||
@ -289,9 +288,7 @@ typedef struct CPU_t {
|
|||||||
SIC_t edge; // tics adjustment threshold boundary
|
SIC_t edge; // tics adjustment threshold boundary
|
||||||
#endif
|
#endif
|
||||||
int id; // cpu number (0 - nn), or numa active flag
|
int id; // cpu number (0 - nn), or numa active flag
|
||||||
#ifndef NUMA_DISABLE
|
|
||||||
int node; // the numa node it belongs to
|
int node; // the numa node it belongs to
|
||||||
#endif
|
|
||||||
} CPU_t;
|
} CPU_t;
|
||||||
|
|
||||||
/* /////////////////////////////////////////////////////////////// */
|
/* /////////////////////////////////////////////////////////////// */
|
||||||
@ -651,12 +648,6 @@ typedef struct WIN_t {
|
|||||||
#if defined(RECALL_FIXED) && defined(TERMIOS_ONLY)
|
#if defined(RECALL_FIXED) && defined(TERMIOS_ONLY)
|
||||||
# error 'RECALL_FIXED' conflicts with 'TERMIOS_ONLY'
|
# error 'RECALL_FIXED' conflicts with 'TERMIOS_ONLY'
|
||||||
#endif
|
#endif
|
||||||
#if defined(PRETEND_NUMA) && defined(NUMA_DISABLE)
|
|
||||||
# error 'PRETEND_NUMA' confilcts with 'NUMA_DISABLE'
|
|
||||||
#endif
|
|
||||||
#if defined(OFF_NUMASKIP) && defined(NUMA_DISABLE)
|
|
||||||
# error 'OFF_NUMASKIP' confilcts with 'NUMA_DISABLE'
|
|
||||||
#endif
|
|
||||||
#if (LRGBUFSIZ < SCREENMAX)
|
#if (LRGBUFSIZ < SCREENMAX)
|
||||||
# error 'LRGBUFSIZ' must NOT be less than 'SCREENMAX'
|
# error 'LRGBUFSIZ' must NOT be less than 'SCREENMAX'
|
||||||
#endif
|
#endif
|
||||||
|
@ -293,6 +293,9 @@ static void build_two_nlstabs (void) {
|
|||||||
/* Translation Hint: maximum 'CGNAME' = 7 */
|
/* Translation Hint: maximum 'CGNAME' = 7 */
|
||||||
Head_nlstab[EU_CGN] = _("CGNAME");
|
Head_nlstab[EU_CGN] = _("CGNAME");
|
||||||
Desc_nlstab[EU_CGN] = _("Control Group name");
|
Desc_nlstab[EU_CGN] = _("Control Group name");
|
||||||
|
/* Translation Hint: maximum 'NU' = 2 */
|
||||||
|
Head_nlstab[EU_NMA] = _("NU");
|
||||||
|
Desc_nlstab[EU_NMA] = _("Last Used NUMA node");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user