Elaborate the highlighting of outdated/deleted executables and libraries

This commit is contained in:
Benny Baumann 2021-10-19 00:39:24 +02:00
parent 60cfa2edce
commit 9d3a1d4981
2 changed files with 18 additions and 6 deletions

View File

@ -107,7 +107,7 @@ DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager*
Panel_add(super, (Object*) CheckItem_newByRef("Show custom thread names", &(settings->showThreadNames))); Panel_add(super, (Object*) CheckItem_newByRef("Show custom thread names", &(settings->showThreadNames)));
Panel_add(super, (Object*) CheckItem_newByRef("Show program path", &(settings->showProgramPath))); Panel_add(super, (Object*) CheckItem_newByRef("Show program path", &(settings->showProgramPath)));
Panel_add(super, (Object*) CheckItem_newByRef("Highlight program \"basename\"", &(settings->highlightBaseName))); Panel_add(super, (Object*) CheckItem_newByRef("Highlight program \"basename\"", &(settings->highlightBaseName)));
Panel_add(super, (Object*) CheckItem_newByRef("Highlight out-dated/removed programs", &(settings->highlightDeletedExe))); Panel_add(super, (Object*) CheckItem_newByRef("Highlight out-dated/removed programs (red) / libraries (yellow)", &(settings->highlightDeletedExe)));
Panel_add(super, (Object*) CheckItem_newByRef("Merge exe, comm and cmdline in Command", &(settings->showMergedCommand))); Panel_add(super, (Object*) CheckItem_newByRef("Merge exe, comm and cmdline in Command", &(settings->showMergedCommand)));
Panel_add(super, (Object*) CheckItem_newByRef("- Try to find comm in cmdline (when Command is merged)", &(settings->findCommInCmdline))); Panel_add(super, (Object*) CheckItem_newByRef("- Try to find comm in cmdline (when Command is merged)", &(settings->findCommInCmdline)));
Panel_add(super, (Object*) CheckItem_newByRef("- Try to strip exe from cmdline (when Command is merged)", &(settings->stripExeFromCmdline))); Panel_add(super, (Object*) CheckItem_newByRef("- Try to strip exe from cmdline (when Command is merged)", &(settings->stripExeFromCmdline)));

View File

@ -285,19 +285,31 @@ is active, the executable path (/proc/[pid]/exe) and the command name
(/proc/[pid]/comm) are also shown merged with the command line, if available. (/proc/[pid]/comm) are also shown merged with the command line, if available.
The program basename is highlighted if set in the configuration. Additional The program basename is highlighted if set in the configuration. Additional
highlighting can be configured for stale executables (cf. Exe column below). highlighting can be configured for stale executables (cf. EXE column below).
.TP .TP
.B Comm .B COMM
The command name of the process obtained from /proc/[pid]/comm, if readable. The command name of the process obtained from /proc/[pid]/comm, if readable.
.TP .TP
.B Exe .B EXE
The abbreviated basename of the executable of the process, obtained from The abbreviated basename of the executable of the process, obtained from
/proc/[pid]/exe, if readable. htop is able to read this file on linux for ALL /proc/[pid]/exe, if readable. htop is able to read this file on linux for ALL
the processes only if it has the capability CAP_SYS_PTRACE or root privileges. the processes only if it has the capability CAP_SYS_PTRACE or root privileges.
The basename is marked in red if the executable used to run the process has The basename is marked in red if the executable used to run the process has
been replaced or deleted on disk since the process started. This additional been replaced or deleted on disk since the process started. The information is
markup can be configured. obtained by processing the contents of /proc/[pid]/exe.
Furthermore the basename is marked in yellow if any library is reported as having
been replaced or deleted on disk since it was last loaded. The information is
obtained by processing the contents of /proc/[pid]/maps.
When deciding the color the replacement of the main executable always takes
precedence over replacement of any other library. If only the memory map indicates
a replacement of the main executable, this will show as if any other library had
been replaced or deleted.
This additional color markup can be configured in the "Display Options" section of
the setup screen.
.TP .TP
.B PID .B PID
The process ID. The process ID.