summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-08-28 17:57:39 +0200
committerBenBE <BenBE@geshi.org>2021-09-02 08:03:21 +0200
commit58a59c11f419bcda1d8b5852f11eb183848f3496 (patch)
tree29a95fd768caa72dfa1e4a463c95ada405f49428 /linux
parent3f806368e072f1c094f1599655fc9c97f6fbc01e (diff)
linux: drop dead process field column DIRTY
The field for dirty pages in /proc/[pid]/statm is always 0 since Linux 2.6 (see man:proc(5)).
Diffstat (limited to 'linux')
-rw-r--r--linux/LinuxProcess.c4
-rw-r--r--linux/LinuxProcess.h1
-rw-r--r--linux/LinuxProcessList.c4
-rw-r--r--linux/ProcessField.h1
4 files changed, 2 insertions, 8 deletions
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
index 31da6e41..e5c5e83b 100644
--- a/linux/LinuxProcess.c
+++ b/linux/LinuxProcess.c
@@ -56,7 +56,6 @@ const ProcessFieldData Process_fields[LAST_PROCESSFIELD] = {
[M_TRS] = { .name = "M_TRS", .title = " CODE ", .description = "Size of the text segment of the process", .flags = 0, .defaultSortDesc = true, },
[M_DRS] = { .name = "M_DRS", .title = " DATA ", .description = "Size of the data segment plus stack usage of the process", .flags = 0, .defaultSortDesc = true, },
[M_LRS] = { .name = "M_LRS", .title = " LIB ", .description = "The library size of the process (calculated from memory maps)", .flags = PROCESS_FLAG_LINUX_LRS_FIX, .defaultSortDesc = true, },
- [M_DT] = { .name = "M_DT", .title = " DIRTY ", .description = "Size of the dirty pages of the process (unused since Linux 2.6; always 0)", .flags = 0, .defaultSortDesc = true, },
[ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
[PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, .defaultSortDesc = true, },
[PERCENT_NORM_CPU] = { .name = "PERCENT_NORM_CPU", .title = "NCPU%", .description = "Normalized percentage of the CPU time the process used in the last sampling (normalized by cpu count)", .flags = 0, .defaultSortDesc = true, },
@@ -210,7 +209,6 @@ static void LinuxProcess_writeField(const Process* this, RichString* str, Proces
case CMINFLT: Process_printCount(str, lp->cminflt, coloring); return;
case CMAJFLT: Process_printCount(str, lp->cmajflt, coloring); return;
case M_DRS: Process_printBytes(str, lp->m_drs * pageSize, coloring); return;
- case M_DT: Process_printBytes(str, lp->m_dt * pageSize, coloring); return;
case M_LRS:
if (lp->m_lrs) {
Process_printBytes(str, lp->m_lrs * pageSize, coloring);
@@ -330,8 +328,6 @@ static int LinuxProcess_compareByKey(const Process* v1, const Process* v2, Proce
switch (key) {
case M_DRS:
return SPACESHIP_NUMBER(p1->m_drs, p2->m_drs);
- case M_DT:
- return SPACESHIP_NUMBER(p1->m_dt, p2->m_dt);
case M_LRS:
return SPACESHIP_NUMBER(p1->m_lrs, p2->m_lrs);
case M_TRS:
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index 9c4f27ea..20399d98 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -47,7 +47,6 @@ typedef struct LinuxProcess_ {
long m_trs;
long m_drs;
long m_lrs;
- long m_dt;
/* Data read (in bytes) */
unsigned long long io_rchar;
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 5c5beedb..487a4dfa 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -678,7 +678,7 @@ static bool LinuxProcessList_readStatmFile(LinuxProcess* process, openat_arg_t p
if (!statmfile)
return false;
- long int dummy;
+ long int dummy, dummy2;
int r = fscanf(statmfile, "%ld %ld %ld %ld %ld %ld %ld",
&process->super.m_virt,
@@ -687,7 +687,7 @@ static bool LinuxProcessList_readStatmFile(LinuxProcess* process, openat_arg_t p
&process->m_trs,
&dummy, /* unused since Linux 2.6; always 0 */
&process->m_drs,
- &process->m_dt);
+ &dummy2); /* unused since Linux 2.6; always 0 */
fclose(statmfile);
if (r == 7) {
diff --git a/linux/ProcessField.h b/linux/ProcessField.h
index d109ff9d..69bdff0b 100644
--- a/linux/ProcessField.h
+++ b/linux/ProcessField.h
@@ -19,7 +19,6 @@ in the source distribution for its full text.
M_TRS = 42, \
M_DRS = 43, \
M_LRS = 44, \
- M_DT = 45, \
CTID = 100, \
VPID = 101, \
VXID = 102, \

© 2014-2024 Faster IT GmbH | imprint | privacy policy