mirror of https://github.com/xzeldon/htop.git
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)).
This commit is contained in:
parent
3f806368e0
commit
58a59c11f4
|
@ -392,9 +392,6 @@ except the process's executable instructions).
|
|||
.B M_LRS (LIB)
|
||||
The library size of the process.
|
||||
.TP
|
||||
.B M_DT (DIRTY)
|
||||
The size of the dirty pages of the process.
|
||||
.TP
|
||||
.B M_SWAP (SWAP)
|
||||
The size of the process's swapped pages.
|
||||
.TP
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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, \
|
||||
|
|
Loading…
Reference in New Issue