mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-15 21:44:36 +03:00
Compare commits
50 Commits
Author | SHA1 | Date | |
---|---|---|---|
e785693ef9 | |||
4cf74de1f1 | |||
0a5890d332 | |||
2128edfba2 | |||
d1c833fe95 | |||
868b0b3574 | |||
04871a2d04 | |||
b7248f6cb8 | |||
74afca7bc1 | |||
2a13e15ad0 | |||
8ac8542b6e | |||
f75a8bc3a1 | |||
d520199e62 | |||
9d8d87e1d5 | |||
57c1538887 | |||
9eb52d5932 | |||
970885edc3 | |||
ae1816e563 | |||
53732ab0bb | |||
8932efece9 | |||
d23627fda9 | |||
4c846921a6 | |||
c5e789db1b | |||
eb94c4f9c9 | |||
8361c6c1ae | |||
07f934ccfb | |||
6f751d5929 | |||
e26a2cf431 | |||
d527bc9132 | |||
dadcb87ad0 | |||
754c0d6bb9 | |||
9f4a4faab9 | |||
a710deeaa7 | |||
466d6f99e2 | |||
1601931bbf | |||
41f9c0ab77 | |||
e28d022716 | |||
d5ac75a5c7 | |||
2ba7d5ff36 | |||
3d99c306b9 | |||
3d3474b3fc | |||
94ad111391 | |||
976fa3b121 | |||
61227793de | |||
e6ded48d1a | |||
87c992739b | |||
29e1fcfa05 | |||
29983ff83a | |||
36b7f57200 | |||
c5fe142256 |
4
Action.c
4
Action.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Action.c
|
htop - Action.c
|
||||||
(C) 2015 Hisham H. Muhammad
|
(C) 2015 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ static Htop_Reaction actionHelp(State* st) {
|
|||||||
int line = 0;
|
int line = 0;
|
||||||
|
|
||||||
mvaddstr(line++, 0, "htop " VERSION " - " COPYRIGHT);
|
mvaddstr(line++, 0, "htop " VERSION " - " COPYRIGHT);
|
||||||
mvaddstr(line++, 0, "Released under the GNU GPLv2. See 'man' page for more info.");
|
mvaddstr(line++, 0, "Released under the GNU GPLv2+. See 'man' page for more info.");
|
||||||
|
|
||||||
attrset(CRT_colors[DEFAULT_COLOR]);
|
attrset(CRT_colors[DEFAULT_COLOR]);
|
||||||
line++;
|
line++;
|
||||||
|
2
Action.h
2
Action.h
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Action.h
|
htop - Action.h
|
||||||
(C) 2015 Hisham H. Muhammad
|
(C) 2015 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
htop - Affinity.c
|
htop - Affinity.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
htop - Affinity.h
|
htop - Affinity.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - AffinityPanel.c
|
htop - AffinityPanel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - AffinityPanel.h
|
htop - AffinityPanel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - AvailableColumnsPanel.c
|
htop - AvailableColumnsPanel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - AvailableColumnsPanel.h
|
htop - AvailableColumnsPanel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - AvailableMetersPanel.c
|
htop - AvailableMetersPanel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - AvailableMetersPanel.h
|
htop - AvailableMetersPanel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - BatteryMeter.c
|
htop - BatteryMeter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
|
|
||||||
This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
|
This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - BatteryMeter.h
|
htop - BatteryMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
|
|
||||||
This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
|
This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - CPUMeter.c
|
htop - CPUMeter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - CPUMeter.h
|
htop - CPUMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
79
CRT.c
79
CRT.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - CRT.c
|
htop - CRT.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -21,14 +21,22 @@ in the source distribution for its full text.
|
|||||||
#include "ProvideCurses.h"
|
#include "ProvideCurses.h"
|
||||||
#include "XUtils.h"
|
#include "XUtils.h"
|
||||||
|
|
||||||
#ifdef HAVE_EXECINFO_H
|
|
||||||
#include <execinfo.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(NDEBUG) && defined(HAVE_MEMFD_CREATE)
|
#if !defined(NDEBUG) && defined(HAVE_MEMFD_CREATE)
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_LIBUNWIND_H) && defined(HAVE_LIBUNWIND)
|
||||||
|
# define PRINT_BACKTRACE
|
||||||
|
# define UNW_LOCAL_ONLY
|
||||||
|
# include <libunwind.h>
|
||||||
|
# if defined(HAVE_DLADDR)
|
||||||
|
# include <dlfcn.h>
|
||||||
|
# endif
|
||||||
|
#elif defined(HAVE_EXECINFO_H)
|
||||||
|
# define PRINT_BACKTRACE
|
||||||
|
# include <execinfo.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define ColorIndex(i,j) ((7-(i))*8+(j))
|
#define ColorIndex(i,j) ((7-(i))*8+(j))
|
||||||
|
|
||||||
@ -1008,6 +1016,59 @@ void CRT_setColors(int colorScheme) {
|
|||||||
CRT_colors = CRT_colorSchemes[colorScheme];
|
CRT_colors = CRT_colorSchemes[colorScheme];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PRINT_BACKTRACE
|
||||||
|
static void print_backtrace(void) {
|
||||||
|
#if defined(HAVE_LIBUNWIND_H) && defined(HAVE_LIBUNWIND)
|
||||||
|
unw_context_t context;
|
||||||
|
unw_getcontext(&context);
|
||||||
|
|
||||||
|
unw_cursor_t cursor;
|
||||||
|
unw_init_local(&cursor, &context);
|
||||||
|
|
||||||
|
unsigned int item = 0;
|
||||||
|
|
||||||
|
while (unw_step(&cursor) > 0) {
|
||||||
|
unw_word_t pc;
|
||||||
|
unw_get_reg(&cursor, UNW_REG_IP, &pc);
|
||||||
|
if (pc == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
char symbolName[256] = "?";
|
||||||
|
unw_word_t offset = 0;
|
||||||
|
unw_get_proc_name(&cursor, symbolName, sizeof(symbolName), &offset);
|
||||||
|
|
||||||
|
unw_proc_info_t pip;
|
||||||
|
pip.unwind_info = NULL;
|
||||||
|
|
||||||
|
const char* fname = "?";
|
||||||
|
const void* ptr = 0;
|
||||||
|
if (unw_get_proc_info(&cursor, &pip) == 0) {
|
||||||
|
ptr = (const void*)(pip.start_ip + offset);
|
||||||
|
|
||||||
|
#ifdef HAVE_DLADDR
|
||||||
|
Dl_info dlinfo;
|
||||||
|
if (dladdr(ptr, &dlinfo) && dlinfo.dli_fname && *dlinfo.dli_fname)
|
||||||
|
fname = dlinfo.dli_fname;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* frame = "";
|
||||||
|
if (unw_is_signal_frame(&cursor) > 0)
|
||||||
|
frame = "{signal frame}";
|
||||||
|
|
||||||
|
fprintf(stderr, "%2u: %#14lx %s (%s+%#lx) [%p]%s%s\n", item++, pc, fname, symbolName, offset, ptr, frame ? " " : "", frame);
|
||||||
|
}
|
||||||
|
#elif defined(HAVE_EXECINFO_H)
|
||||||
|
void* backtraceArray[256];
|
||||||
|
|
||||||
|
size_t size = backtrace(backtraceArray, ARRAYSIZE(backtraceArray));
|
||||||
|
backtrace_symbols_fd(backtraceArray, size, STDERR_FILENO);
|
||||||
|
#else
|
||||||
|
#error No implementation for print_backtrace()!
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void CRT_handleSIGSEGV(int signal) {
|
void CRT_handleSIGSEGV(int signal) {
|
||||||
CRT_done();
|
CRT_done();
|
||||||
|
|
||||||
@ -1022,7 +1083,7 @@ void CRT_handleSIGSEGV(int signal) {
|
|||||||
" - Likely steps to reproduce (How did it happen?)\n"
|
" - Likely steps to reproduce (How did it happen?)\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef HAVE_EXECINFO_H
|
#ifdef PRINT_BACKTRACE
|
||||||
fprintf(stderr, " - Backtrace of the issue (see below)\n");
|
fprintf(stderr, " - Backtrace of the issue (see below)\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1048,16 +1109,14 @@ void CRT_handleSIGSEGV(int signal) {
|
|||||||
Settings_write(CRT_crashSettings, true);
|
Settings_write(CRT_crashSettings, true);
|
||||||
fprintf(stderr, "\n\n");
|
fprintf(stderr, "\n\n");
|
||||||
|
|
||||||
#ifdef HAVE_EXECINFO_H
|
#ifdef PRINT_BACKTRACE
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Backtrace information:\n"
|
"Backtrace information:\n"
|
||||||
"----------------------\n"
|
"----------------------\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
void* backtraceArray[256];
|
print_backtrace();
|
||||||
|
|
||||||
size_t size = backtrace(backtraceArray, ARRAYSIZE(backtraceArray));
|
|
||||||
backtrace_symbols_fd(backtraceArray, size, STDERR_FILENO);
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\n"
|
"\n"
|
||||||
"To make the above information more practical to work with, "
|
"To make the above information more practical to work with, "
|
||||||
|
8
CRT.h
8
CRT.h
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - CRT.h
|
htop - CRT.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -147,9 +147,9 @@ void CRT_fatalError(const char* note) ATTR_NORETURN;
|
|||||||
|
|
||||||
void CRT_handleSIGSEGV(int signal) ATTR_NORETURN;
|
void CRT_handleSIGSEGV(int signal) ATTR_NORETURN;
|
||||||
|
|
||||||
#define KEY_WHEELUP KEY_F(20)
|
#define KEY_WHEELUP KEY_F(30)
|
||||||
#define KEY_WHEELDOWN KEY_F(21)
|
#define KEY_WHEELDOWN KEY_F(31)
|
||||||
#define KEY_RECLICK KEY_F(22)
|
#define KEY_RECLICK KEY_F(32)
|
||||||
#define KEY_ALT(x) (KEY_F(64 - 26) + ((x) - 'A'))
|
#define KEY_ALT(x) (KEY_F(64 - 26) + ((x) - 'A'))
|
||||||
|
|
||||||
extern const char* CRT_degreeSign;
|
extern const char* CRT_degreeSign;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - CategoriesPanel.c
|
htop - CategoriesPanel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - CategoriesPanel.h
|
htop - CategoriesPanel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
|||||||
|
What's new in version 3.1.1
|
||||||
|
|
||||||
|
* Update license headers to explicitly say GPLv2+
|
||||||
|
* Document minimum version for libcap (thanks to James Brown)
|
||||||
|
* Fix mouse wheel collision with autogroups nice adjustment
|
||||||
|
* Adjust Makefile.am macro definitions for older automake versions
|
||||||
|
* Ensure consistent reporting of MemoryMeter 'used' memory
|
||||||
|
* Report hugepage memory as real and used memory (as before)
|
||||||
|
* Handle procExeDeleted, usesDeletedLib without mergedCommandline mode
|
||||||
|
* Validate meter configuration before proceeding beyond htoprc parsing
|
||||||
|
* Properly release memory on partially read configuration
|
||||||
|
* Handle interrupted sampling from within libpcp PDU transfers
|
||||||
|
* On Linux, provide O_PATH value if not defined
|
||||||
|
* On Linux, always compute procExeDeleted if already set
|
||||||
|
* Workaround for Rosetta 2 on Darwin (thanks to Alexander Momchilov)
|
||||||
|
* Fix FreeBSD cmdline memory leak in Process_updateCmdline, and
|
||||||
|
* Plug a Disk I/O meter memory leak on FreeBSD (thanks to Ximalas)
|
||||||
|
|
||||||
What's new in version 3.1.0
|
What's new in version 3.1.0
|
||||||
|
|
||||||
* Updated COPYING file to remove the PLPA exemption (appendix 2)
|
* Updated COPYING file to remove the PLPA exemption (appendix 2)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ClockMeter.c
|
htop - ClockMeter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ClockMeter.h
|
htop - ClockMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ColorsPanel.c
|
htop - ColorsPanel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ColorsPanel.h
|
htop - ColorsPanel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ColumnsPanel.c
|
htop - ColumnsPanel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ColumnsPanel.h
|
htop - ColumnsPanel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
htop - CommandLine.c
|
htop - CommandLine.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
(C) 2020-2021 htop dev team
|
(C) 2020-2021 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ static void printVersionFlag(const char* name) {
|
|||||||
static void printHelpFlag(const char* name) {
|
static void printHelpFlag(const char* name) {
|
||||||
printf("%s " VERSION "\n"
|
printf("%s " VERSION "\n"
|
||||||
COPYRIGHT "\n"
|
COPYRIGHT "\n"
|
||||||
"Released under the GNU GPLv2.\n\n"
|
"Released under the GNU GPLv2+.\n\n"
|
||||||
"-C --no-color Use a monochrome color scheme\n"
|
"-C --no-color Use a monochrome color scheme\n"
|
||||||
"-d --delay=DELAY Set the delay between updates, in tenths of seconds\n"
|
"-d --delay=DELAY Set the delay between updates, in tenths of seconds\n"
|
||||||
"-F --filter=FILTER Show only the commands matching the given filter\n"
|
"-F --filter=FILTER Show only the commands matching the given filter\n"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
htop - CommandLine.h
|
htop - CommandLine.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
(C) 2020-2021 htop dev team
|
(C) 2020-2021 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
Compat.c
2
Compat.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Compat.c
|
htop - Compat.c
|
||||||
(C) 2020 htop dev team
|
(C) 2020 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
Compat.h
2
Compat.h
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Compat.h
|
htop - Compat.h
|
||||||
(C) 2020 htop dev team
|
(C) 2020 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - DateMeter.c
|
htop - DateMeter.c
|
||||||
(C) 2004-2020 Hisham H. Muhammad, Michael Schönitzer
|
(C) 2004-2020 Hisham H. Muhammad, Michael Schönitzer
|
||||||
Released under the GNU GPL, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - DateMeter.h
|
htop - DateMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPL, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - DateTimeMeter.c
|
htop - DateTimeMeter.c
|
||||||
(C) 2004-2020 Hisham H. Muhammad, Michael Schönitzer
|
(C) 2004-2020 Hisham H. Muhammad, Michael Schönitzer
|
||||||
Released under the GNU GPL, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - DateTimeMeter.h
|
htop - DateTimeMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPL, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - DiskIOMeter.c
|
htop - DiskIOMeter.c
|
||||||
(C) 2020 htop dev team
|
(C) 2020 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - DiskIOMeter.h
|
htop - DiskIOMeter.h
|
||||||
(C) 2020 htop dev team
|
(C) 2020 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - DisplayOptionsPanel.c
|
htop - DisplayOptionsPanel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - DisplayOptionsPanel.h
|
htop - DisplayOptionsPanel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ htop - DynamicColumn.c
|
|||||||
(C) 2021 Sohaib Mohammed
|
(C) 2021 Sohaib Mohammed
|
||||||
(C) 2021 htop dev team
|
(C) 2021 htop dev team
|
||||||
(C) 2021 Red Hat, Inc. All Rights Reserved.
|
(C) 2021 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
htop - DynamicMeter.c
|
htop - DynamicMeter.c
|
||||||
(C) 2021 htop dev team
|
(C) 2021 htop dev team
|
||||||
(C) 2021 Red Hat, Inc. All Rights Reserved.
|
(C) 2021 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - FunctionBar.c
|
htop - FunctionBar.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - FunctionBar.h
|
htop - FunctionBar.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Hashtable.c
|
htop - Hashtable.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Hashtable.h
|
htop - Hashtable.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
Header.c
2
Header.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Header.c
|
htop - Header.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
Header.h
2
Header.h
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Header.h
|
htop - Header.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - HeaderLayout.h
|
htop - HeaderLayout.h
|
||||||
(C) 2021 htop dev team
|
(C) 2021 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - HeaderOptionsPanel.c
|
htop - HeaderOptionsPanel.c
|
||||||
(C) 2021 htop dev team
|
(C) 2021 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ColorsPanel.h
|
htop - ColorsPanel.h
|
||||||
(C) 2021 htop dev team
|
(C) 2021 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - HostnameMeter.c
|
htop - HostnameMeter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - HostnameMeter.h
|
htop - HostnameMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
4
IncSet.c
4
IncSet.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - IncSet.c
|
htop - IncSet.c
|
||||||
(C) 2005-2012 Hisham H. Muhammad
|
(C) 2005-2012 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ bool IncSet_handleKey(IncSet* this, int ch, Panel* panel, IncMode_GetPanelValue
|
|||||||
doSearch = false;
|
doSearch = false;
|
||||||
} else if (0 < ch && ch < 255 && isprint((unsigned char)ch)) {
|
} else if (0 < ch && ch < 255 && isprint((unsigned char)ch)) {
|
||||||
if (mode->index < INCMODE_MAX) {
|
if (mode->index < INCMODE_MAX) {
|
||||||
mode->buffer[mode->index] = ch;
|
mode->buffer[mode->index] = (char) ch;
|
||||||
mode->index++;
|
mode->index++;
|
||||||
mode->buffer[mode->index] = 0;
|
mode->buffer[mode->index] = 0;
|
||||||
if (mode->isFilter) {
|
if (mode->isFilter) {
|
||||||
|
2
IncSet.h
2
IncSet.h
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - IncSet.h
|
htop - IncSet.h
|
||||||
(C) 2005-2012 Hisham H. Muhammad
|
(C) 2005-2012 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ListItem.c
|
htop - ListItem.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ListItem.h
|
htop - ListItem.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - LoadAverageMeter.c
|
htop - LoadAverageMeter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - LoadAverageMeter.h
|
htop - LoadAverageMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
12
MainPanel.c
12
MainPanel.c
@ -2,7 +2,7 @@
|
|||||||
htop - ColumnsPanel.c
|
htop - ColumnsPanel.c
|
||||||
(C) 2004-2015 Hisham H. Muhammad
|
(C) 2004-2015 Hisham H. Muhammad
|
||||||
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -61,8 +61,14 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
|
|||||||
if (ch == KEY_RESIZE)
|
if (ch == KEY_RESIZE)
|
||||||
return IGNORED;
|
return IGNORED;
|
||||||
|
|
||||||
/* reset on every normal key, except mouse events while mouse support is disabled */
|
/* reset on every normal key */
|
||||||
if (ch != ERR && (ch != KEY_MOUSE || this->state->settings->enableMouse))
|
bool needReset = ch != ERR;
|
||||||
|
#ifdef HAVE_GETMOUSE
|
||||||
|
/* except mouse events while mouse support is disabled */
|
||||||
|
if (!(ch != KEY_MOUSE || this->state->settings->enableMouse))
|
||||||
|
needReset = false;
|
||||||
|
#endif
|
||||||
|
if (needReset)
|
||||||
this->state->hideProcessSelection = false;
|
this->state->hideProcessSelection = false;
|
||||||
|
|
||||||
if (EVENT_IS_HEADER_CLICK(ch)) {
|
if (EVENT_IS_HEADER_CLICK(ch)) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
htop - ColumnsPanel.h
|
htop - ColumnsPanel.h
|
||||||
(C) 2004-2015 Hisham H. Muhammad
|
(C) 2004-2015 Hisham H. Muhammad
|
||||||
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
24
Makefile.am
24
Makefile.am
@ -1,3 +1,11 @@
|
|||||||
|
if !HTOP_PCP
|
||||||
|
bin_PROGRAMS = htop
|
||||||
|
myhtopplatprogram = htop.c
|
||||||
|
else
|
||||||
|
bin_PROGRAMS = pcp-htop
|
||||||
|
myhtopplatprogram = pcp-htop.c
|
||||||
|
endif
|
||||||
|
|
||||||
dist_man_MANS = htop.1
|
dist_man_MANS = htop.1
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
$(dist_man_MANS) \
|
$(dist_man_MANS) \
|
||||||
@ -181,7 +189,6 @@ linux_platform_sources = \
|
|||||||
|
|
||||||
if HTOP_LINUX
|
if HTOP_LINUX
|
||||||
AM_LDFLAGS += -rdynamic
|
AM_LDFLAGS += -rdynamic
|
||||||
myhtopplatprogram = htop
|
|
||||||
myhtopplatheaders = $(linux_platform_headers)
|
myhtopplatheaders = $(linux_platform_headers)
|
||||||
myhtopplatsources = $(linux_platform_sources)
|
myhtopplatsources = $(linux_platform_sources)
|
||||||
endif
|
endif
|
||||||
@ -214,7 +221,6 @@ freebsd_platform_sources = \
|
|||||||
zfs/ZfsCompressedArcMeter.c
|
zfs/ZfsCompressedArcMeter.c
|
||||||
|
|
||||||
if HTOP_FREEBSD
|
if HTOP_FREEBSD
|
||||||
myhtopplatprogram = htop
|
|
||||||
myhtopplatheaders = $(freebsd_platform_headers)
|
myhtopplatheaders = $(freebsd_platform_headers)
|
||||||
myhtopplatsources = $(freebsd_platform_sources)
|
myhtopplatsources = $(freebsd_platform_sources)
|
||||||
endif
|
endif
|
||||||
@ -240,7 +246,6 @@ dragonflybsd_platform_sources = \
|
|||||||
generic/uname.c
|
generic/uname.c
|
||||||
|
|
||||||
if HTOP_DRAGONFLYBSD
|
if HTOP_DRAGONFLYBSD
|
||||||
myhtopplatprogram = htop
|
|
||||||
myhtopplatheaders = $(dragonflybsd_platform_headers)
|
myhtopplatheaders = $(dragonflybsd_platform_headers)
|
||||||
myhtopplatsources = $(dragonflybsd_platform_sources)
|
myhtopplatsources = $(dragonflybsd_platform_sources)
|
||||||
endif
|
endif
|
||||||
@ -266,7 +271,6 @@ netbsd_platform_sources = \
|
|||||||
netbsd/NetBSDProcessList.c
|
netbsd/NetBSDProcessList.c
|
||||||
|
|
||||||
if HTOP_NETBSD
|
if HTOP_NETBSD
|
||||||
myhtopplatprogram = htop
|
|
||||||
myhtopplatheaders = $(netbsd_platform_headers)
|
myhtopplatheaders = $(netbsd_platform_headers)
|
||||||
myhtopplatsources = $(netbsd_platform_sources)
|
myhtopplatsources = $(netbsd_platform_sources)
|
||||||
endif
|
endif
|
||||||
@ -292,7 +296,6 @@ openbsd_platform_sources = \
|
|||||||
openbsd/Platform.c
|
openbsd/Platform.c
|
||||||
|
|
||||||
if HTOP_OPENBSD
|
if HTOP_OPENBSD
|
||||||
myhtopplatprogram = htop
|
|
||||||
myhtopplatheaders = $(openbsd_platform_headers)
|
myhtopplatheaders = $(openbsd_platform_headers)
|
||||||
myhtopplatsources = $(openbsd_platform_sources)
|
myhtopplatsources = $(openbsd_platform_sources)
|
||||||
endif
|
endif
|
||||||
@ -304,6 +307,7 @@ darwin_platform_headers = \
|
|||||||
darwin/DarwinProcess.h \
|
darwin/DarwinProcess.h \
|
||||||
darwin/DarwinProcessList.h \
|
darwin/DarwinProcessList.h \
|
||||||
darwin/Platform.h \
|
darwin/Platform.h \
|
||||||
|
darwin/PlatformHelpers.h \
|
||||||
darwin/ProcessField.h \
|
darwin/ProcessField.h \
|
||||||
generic/gettime.h \
|
generic/gettime.h \
|
||||||
generic/hostname.h \
|
generic/hostname.h \
|
||||||
@ -315,6 +319,7 @@ darwin_platform_headers = \
|
|||||||
|
|
||||||
darwin_platform_sources = \
|
darwin_platform_sources = \
|
||||||
darwin/Platform.c \
|
darwin/Platform.c \
|
||||||
|
darwin/PlatformHelpers.c \
|
||||||
darwin/DarwinProcess.c \
|
darwin/DarwinProcess.c \
|
||||||
darwin/DarwinProcessList.c \
|
darwin/DarwinProcessList.c \
|
||||||
generic/gettime.c \
|
generic/gettime.c \
|
||||||
@ -326,7 +331,6 @@ darwin_platform_sources = \
|
|||||||
|
|
||||||
if HTOP_DARWIN
|
if HTOP_DARWIN
|
||||||
AM_LDFLAGS += -framework IOKit -framework CoreFoundation
|
AM_LDFLAGS += -framework IOKit -framework CoreFoundation
|
||||||
myhtopplatprogram = htop
|
|
||||||
myhtopplatheaders = $(darwin_platform_headers)
|
myhtopplatheaders = $(darwin_platform_headers)
|
||||||
myhtopplatsources = $(darwin_platform_sources)
|
myhtopplatsources = $(darwin_platform_sources)
|
||||||
endif
|
endif
|
||||||
@ -357,7 +361,6 @@ solaris_platform_sources = \
|
|||||||
zfs/ZfsCompressedArcMeter.c
|
zfs/ZfsCompressedArcMeter.c
|
||||||
|
|
||||||
if HTOP_SOLARIS
|
if HTOP_SOLARIS
|
||||||
myhtopplatprogram = htop
|
|
||||||
myhtopplatheaders = $(solaris_platform_headers)
|
myhtopplatheaders = $(solaris_platform_headers)
|
||||||
myhtopplatsources = $(solaris_platform_sources)
|
myhtopplatsources = $(solaris_platform_sources)
|
||||||
endif
|
endif
|
||||||
@ -393,10 +396,9 @@ pcp_platform_sources = \
|
|||||||
zfs/ZfsCompressedArcMeter.c
|
zfs/ZfsCompressedArcMeter.c
|
||||||
|
|
||||||
if HTOP_PCP
|
if HTOP_PCP
|
||||||
myhtopplatprogram = pcp-htop
|
|
||||||
myhtopplatheaders = $(pcp_platform_headers)
|
myhtopplatheaders = $(pcp_platform_headers)
|
||||||
myhtopplatsources = $(pcp_platform_sources)
|
myhtopplatsources = $(pcp_platform_sources)
|
||||||
pcp_htop_SOURCES = $(myhtopplatprogram).c $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
|
pcp_htop_SOURCES = $(myhtopplatprogram) $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Unsupported
|
# Unsupported
|
||||||
@ -416,15 +418,13 @@ unsupported_platform_sources = \
|
|||||||
unsupported/UnsupportedProcessList.c
|
unsupported/UnsupportedProcessList.c
|
||||||
|
|
||||||
if HTOP_UNSUPPORTED
|
if HTOP_UNSUPPORTED
|
||||||
myhtopplatprogram = htop
|
|
||||||
myhtopplatsources = $(unsupported_platform_sources)
|
myhtopplatsources = $(unsupported_platform_sources)
|
||||||
myhtopplatheaders = $(unsupported_platform_headers)
|
myhtopplatheaders = $(unsupported_platform_headers)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ----
|
# ----
|
||||||
|
|
||||||
bin_PROGRAMS = $(myhtopplatprogram)
|
htop_SOURCES = $(myhtopplatprogram) $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
|
||||||
htop_SOURCES = $(myhtopplatprogram).c $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
|
|
||||||
nodist_htop_SOURCES = config.h
|
nodist_htop_SOURCES = config.h
|
||||||
|
|
||||||
target:
|
target:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - MemoryMeter.c
|
htop - MemoryMeter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ static void MemoryMeter_updateValues(Meter* this) {
|
|||||||
/* Do not print available memory in bar mode */
|
/* Do not print available memory in bar mode */
|
||||||
this->curItems = 4;
|
this->curItems = 4;
|
||||||
|
|
||||||
written = Meter_humanUnit(buffer, isnan(this->values[4]) ? this->values[0] : this->total - this->values[4], size);
|
written = Meter_humanUnit(buffer, this->values[0], size);
|
||||||
METER_BUFFER_CHECK(buffer, size, written);
|
METER_BUFFER_CHECK(buffer, size, written);
|
||||||
|
|
||||||
METER_BUFFER_APPEND_CHR(buffer, size, '/');
|
METER_BUFFER_APPEND_CHR(buffer, size, '/');
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - MemoryMeter.h
|
htop - MemoryMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - MemorySwapMeter.c
|
htop - MemorySwapMeter.c
|
||||||
(C) 2021 htop dev team
|
(C) 2021 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - MemorySwapMeter.h
|
htop - MemorySwapMeter.h
|
||||||
(C) 2021 htop dev team
|
(C) 2021 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
Meter.c
2
Meter.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Meter.c
|
htop - Meter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
Meter.h
2
Meter.h
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Meter.h
|
htop - Meter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - MetersPanel.c
|
htop - MetersPanel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - MetersPanel.h
|
htop - MetersPanel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
Object.c
2
Object.c
@ -2,7 +2,7 @@
|
|||||||
htop - Object.c
|
htop - Object.c
|
||||||
(C) 2004-2012 Hisham H. Muhammad
|
(C) 2004-2012 Hisham H. Muhammad
|
||||||
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2
Object.h
2
Object.h
@ -4,7 +4,7 @@
|
|||||||
htop - Object.h
|
htop - Object.h
|
||||||
(C) 2004-2012 Hisham H. Muhammad
|
(C) 2004-2012 Hisham H. Muhammad
|
||||||
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - OpenFilesScreen.c
|
htop - OpenFilesScreen.c
|
||||||
(C) 2005-2006 Hisham H. Muhammad
|
(C) 2005-2006 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - OpenFilesScreen.h
|
htop - OpenFilesScreen.h
|
||||||
(C) 2005-2006 Hisham H. Muhammad
|
(C) 2005-2006 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - OptionItem.c
|
htop - OptionItem.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - OptionItem.h
|
htop - OptionItem.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
6
Panel.c
6
Panel.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Panel.c
|
htop - Panel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -453,7 +453,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (len < 99) {
|
if (len < 99) {
|
||||||
buffer[len] = ch;
|
buffer[len] = (char) ch;
|
||||||
buffer[len + 1] = '\0';
|
buffer[len + 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,7 +470,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) {
|
|||||||
|
|
||||||
// if current word did not match,
|
// if current word did not match,
|
||||||
// retry considering the character the start of a new word.
|
// retry considering the character the start of a new word.
|
||||||
buffer[0] = ch;
|
buffer[0] = (char) ch;
|
||||||
buffer[1] = '\0';
|
buffer[1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
Panel.h
4
Panel.h
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Panel.h
|
htop - Panel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ struct Panel_ {
|
|||||||
int selectedLen;
|
int selectedLen;
|
||||||
void* eventHandlerState;
|
void* eventHandlerState;
|
||||||
int scrollV;
|
int scrollV;
|
||||||
short scrollH;
|
int scrollH;
|
||||||
bool needsRedraw;
|
bool needsRedraw;
|
||||||
bool wasFocus;
|
bool wasFocus;
|
||||||
FunctionBar* currentBar;
|
FunctionBar* currentBar;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
htop - Process.c
|
htop - Process.c
|
||||||
(C) 2004-2015 Hisham H. Muhammad
|
(C) 2004-2015 Hisham H. Muhammad
|
||||||
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -511,6 +511,12 @@ void Process_makeCommandStr(Process* this) {
|
|||||||
|
|
||||||
if (cmdlineBasenameEnd > cmdlineBasenameStart)
|
if (cmdlineBasenameEnd > cmdlineBasenameStart)
|
||||||
WRITE_HIGHLIGHT(showProgramPath ? cmdlineBasenameStart : 0, cmdlineBasenameEnd - cmdlineBasenameStart, baseAttr, CMDLINE_HIGHLIGHT_FLAG_BASENAME);
|
WRITE_HIGHLIGHT(showProgramPath ? cmdlineBasenameStart : 0, cmdlineBasenameEnd - cmdlineBasenameStart, baseAttr, CMDLINE_HIGHLIGHT_FLAG_BASENAME);
|
||||||
|
|
||||||
|
if (this->procExeDeleted)
|
||||||
|
WRITE_HIGHLIGHT(showProgramPath ? cmdlineBasenameStart : 0, cmdlineBasenameEnd - cmdlineBasenameStart, delExeAttr, CMDLINE_HIGHLIGHT_FLAG_DELETED);
|
||||||
|
else if (this->usesDeletedLib)
|
||||||
|
WRITE_HIGHLIGHT(showProgramPath ? cmdlineBasenameStart : 0, cmdlineBasenameEnd - cmdlineBasenameStart, delLibAttr, CMDLINE_HIGHLIGHT_FLAG_DELETED);
|
||||||
|
|
||||||
(void)stpcpyWithNewlineConversion(str, cmdline + (showProgramPath ? 0 : cmdlineBasenameStart));
|
(void)stpcpyWithNewlineConversion(str, cmdline + (showProgramPath ? 0 : cmdlineBasenameStart));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
htop - Process.h
|
htop - Process.h
|
||||||
(C) 2004-2015 Hisham H. Muhammad
|
(C) 2004-2015 Hisham H. Muhammad
|
||||||
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
(C) 2020 Red Hat, Inc. All Rights Reserved.
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ProcessList.c
|
htop - ProcessList.c
|
||||||
(C) 2004,2005 Hisham H. Muhammad
|
(C) 2004,2005 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ProcessList.h
|
htop - ProcessList.h
|
||||||
(C) 2004,2005 Hisham H. Muhammad
|
(C) 2004,2005 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ProcessLocksScreen.c
|
htop - ProcessLocksScreen.c
|
||||||
(C) 2020 htop dev team
|
(C) 2020 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ProcessLocksScreen.h
|
htop - ProcessLocksScreen.h
|
||||||
(C) 2020 htop dev team
|
(C) 2020 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - RichString.h
|
htop - RichString.h
|
||||||
(C) 2004,2011 Hisham H. Muhammad
|
(C) 2004,2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPL, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
20
README
20
README
@ -6,7 +6,7 @@
|
|||||||
[](https://web.libera.chat/#htop)
|
[](https://web.libera.chat/#htop)
|
||||||
[](https://github.com/htop-dev/htop/releases/latest)
|
[](https://github.com/htop-dev/htop/releases/latest)
|
||||||
[](https://repology.org/project/htop/versions)
|
[](https://repology.org/project/htop/versions)
|
||||||
[](COPYING?raw=true)
|
[](COPYING?raw=true)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -38,7 +38,7 @@ List of build-time dependencies:
|
|||||||
* `ncurses`
|
* `ncurses`
|
||||||
|
|
||||||
**Note about `ncurses`:**
|
**Note about `ncurses`:**
|
||||||
> htop requires ncurses 6.0. Be aware the appropriate package is sometimes still called libncurses5 (on Debian/Ubuntu). Also ncurses usually comes in two flavours:
|
> `htop` requires `ncurses` 6.0. Be aware the appropriate package is sometimes still called libncurses5 (on Debian/Ubuntu). Also `ncurses` usually comes in two flavours:
|
||||||
>* With Unicode support.
|
>* With Unicode support.
|
||||||
>* Without Unicode support.
|
>* Without Unicode support.
|
||||||
>
|
>
|
||||||
@ -47,7 +47,7 @@ List of build-time dependencies:
|
|||||||
List of additional build-time dependencies (based on feature flags):
|
List of additional build-time dependencies (based on feature flags):
|
||||||
* `sensors`
|
* `sensors`
|
||||||
* `hwloc`
|
* `hwloc`
|
||||||
* `libcap`
|
* `libcap` (v2.21 or later)
|
||||||
* `libnl-3`
|
* `libnl-3`
|
||||||
|
|
||||||
Install these and other required packages for C development from your package manager.
|
Install these and other required packages for C development from your package manager.
|
||||||
@ -138,12 +138,12 @@ To install on the local system run `make install`. By default `make install` ins
|
|||||||
`htop` has a set of fixed optional dependencies, depending on build/configure option used:
|
`htop` has a set of fixed optional dependencies, depending on build/configure option used:
|
||||||
|
|
||||||
#### Linux
|
#### Linux
|
||||||
* `libdl`, if not building a static binary, is always required when support for to optionally dependencies (i.e. `libsensors`, `libsystemd`) is present.
|
* `libdl`, if not building a static binary, is always required when support for optional dependencies (i.e. `libsensors`, `libsystemd`) is present.
|
||||||
* `libcap`, user-space interfaces to the POSIX 1003.1e, is always required when `--enable-capabilities` was used to configure `htop`.
|
* `libcap`, user-space interfaces to POSIX 1003.1e capabilities, is always required when `--enable-capabilities` was used to configure `htop`.
|
||||||
* `libsensors`, readout of temperatures and CPU speeds, is optional even when `--enable-sensors` was used to configure `htop`.
|
* `libsensors`, readout of temperatures and CPU speeds, is optional even when `--enable-sensors` was used to configure `htop`.
|
||||||
* `libsystemd` is optional when `--enable-static` was not used to configure `htop`. If building statically and `libsystemd` is not found by `configure`, support for the systemd meter is disabled entirely.
|
* `libsystemd` is optional when `--enable-static` was not used to configure `htop`. If building statically and `libsystemd` is not found by `configure`, support for the systemd meter is disabled entirely.
|
||||||
|
|
||||||
`htop` checks for the availability of the actual runtime lib as `htop` runs.
|
`htop` checks for the availability of the actual runtime libraries as `htop` runs.
|
||||||
|
|
||||||
#### BSD
|
#### BSD
|
||||||
On most BSD systems `kvm` is a requirement to read kernel information.
|
On most BSD systems `kvm` is a requirement to read kernel information.
|
||||||
@ -155,15 +155,15 @@ See the manual page (`man htop`) or the help menu (**F1** or **h** inside `htop`
|
|||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
If you have trouble running `htop` please consult your Operating System / Linux distribution documentation for getting support and filing bugs.
|
If you have trouble running `htop` please consult your operating system / Linux distribution documentation for getting support and filing bugs.
|
||||||
|
|
||||||
## Bugs, development feedback
|
## Bugs, development feedback
|
||||||
|
|
||||||
We have a [development mailing list](https://htop.dev/mailinglist.html). Feel free to subscribe for release announcements or asking questions on the development of htop.
|
We have a [development mailing list](https://htop.dev/mailinglist.html). Feel free to subscribe for release announcements or asking questions on the development of `htop`.
|
||||||
|
|
||||||
You can also join our IRC channel [#htop on Libera.Chat](https://web.libera.chat/#htop) and talk to the developers there.
|
You can also join our IRC channel [#htop on Libera.Chat](https://web.libera.chat/#htop) and talk to the developers there.
|
||||||
|
|
||||||
If you have found an issue within the source of htop, please check whether this has already been reported in our [GitHub issue tracker](https://github.com/htop-dev/htop/issues).
|
If you have found an issue within the source of `htop`, please check whether this has already been reported in our [GitHub issue tracker](https://github.com/htop-dev/htop/issues).
|
||||||
If not, please file a new issue describing the problem you have found, the potential location in the source code you are referring to and a possible fix if available.
|
If not, please file a new issue describing the problem you have found, the potential location in the source code you are referring to and a possible fix if available.
|
||||||
|
|
||||||
## History
|
## History
|
||||||
@ -174,4 +174,4 @@ In 2020 a [team](https://github.com/orgs/htop-dev/people) took over the developm
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
GNU General Public License, version 2 (GPL-2.0)
|
GNU General Public License, version 2 (GPL-2.0) or, at your option, any later version.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - RichString.c
|
htop - RichString.c
|
||||||
(C) 2004,2011 Hisham H. Muhammad
|
(C) 2004,2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - RichString.h
|
htop - RichString.h
|
||||||
(C) 2004,2011 Hisham H. Muhammad
|
(C) 2004,2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ScreenManager.c
|
htop - ScreenManager.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - ScreenManager.h
|
htop - ScreenManager.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
58
Settings.c
58
Settings.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Settings.c
|
htop - Settings.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -28,11 +28,7 @@ void Settings_delete(Settings* this) {
|
|||||||
free(this->filename);
|
free(this->filename);
|
||||||
free(this->fields);
|
free(this->fields);
|
||||||
for (unsigned int i = 0; i < HeaderLayout_getColumns(this->hLayout); i++) {
|
for (unsigned int i = 0; i < HeaderLayout_getColumns(this->hLayout); i++) {
|
||||||
if (this->hColumns[i].names) {
|
String_freeArray(this->hColumns[i].names);
|
||||||
for (uint8_t j = 0; j < this->hColumns[i].len; j++)
|
|
||||||
free(this->hColumns[i].names[j]);
|
|
||||||
free(this->hColumns[i].names);
|
|
||||||
}
|
|
||||||
free(this->hColumns[i].modes);
|
free(this->hColumns[i].modes);
|
||||||
}
|
}
|
||||||
free(this->hColumns);
|
free(this->hColumns);
|
||||||
@ -65,16 +61,51 @@ static void Settings_readMeterModes(Settings* this, const char* line, unsigned i
|
|||||||
this->hColumns[column].modes = modes;
|
this->hColumns[column].modes = modes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool Settings_validateMeters(Settings* this) {
|
||||||
|
const size_t colCount = HeaderLayout_getColumns(this->hLayout);
|
||||||
|
|
||||||
|
for (size_t column = 0; column < colCount; column++) {
|
||||||
|
char** names = this->hColumns[column].names;
|
||||||
|
const int* modes = this->hColumns[column].modes;
|
||||||
|
const size_t len = this->hColumns[column].len;
|
||||||
|
|
||||||
|
if (!names || !modes || !len)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Check for each mode there is an entry with a non-NULL name
|
||||||
|
for (size_t meterIdx = 0; meterIdx < len; meterIdx++)
|
||||||
|
if (!names[meterIdx])
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (names[len])
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static void Settings_defaultMeters(Settings* this, unsigned int initialCpuCount) {
|
static void Settings_defaultMeters(Settings* this, unsigned int initialCpuCount) {
|
||||||
int sizes[] = { 3, 3 };
|
int sizes[] = { 3, 3 };
|
||||||
|
|
||||||
if (initialCpuCount > 4 && initialCpuCount <= 128) {
|
if (initialCpuCount > 4 && initialCpuCount <= 128) {
|
||||||
sizes[1]++;
|
sizes[1]++;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 2; i++) {
|
|
||||||
|
// Release any previously allocated memory
|
||||||
|
for (size_t i = 0; i < HeaderLayout_getColumns(this->hLayout); i++) {
|
||||||
|
String_freeArray(this->hColumns[i].names);
|
||||||
|
free(this->hColumns[i].modes);
|
||||||
|
}
|
||||||
|
free(this->hColumns);
|
||||||
|
|
||||||
|
this->hLayout = HF_TWO_50_50;
|
||||||
|
this->hColumns = xCalloc(HeaderLayout_getColumns(this->hLayout), sizeof(MeterColumnSetting));
|
||||||
|
for (size_t i = 0; i < 2; i++) {
|
||||||
this->hColumns[i].names = xCalloc(sizes[i] + 1, sizeof(char*));
|
this->hColumns[i].names = xCalloc(sizes[i] + 1, sizeof(char*));
|
||||||
this->hColumns[i].modes = xCalloc(sizes[i], sizeof(int));
|
this->hColumns[i].modes = xCalloc(sizes[i], sizeof(int));
|
||||||
this->hColumns[i].len = sizes[i];
|
this->hColumns[i].len = sizes[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
int r = 0;
|
int r = 0;
|
||||||
|
|
||||||
if (initialCpuCount > 128) {
|
if (initialCpuCount > 128) {
|
||||||
@ -181,8 +212,9 @@ static bool Settings_read(Settings* this, const char* fileName, unsigned int ini
|
|||||||
this->config_version = atoi(option[1]);
|
this->config_version = atoi(option[1]);
|
||||||
if (this->config_version > CONFIG_READER_MIN_VERSION) {
|
if (this->config_version > CONFIG_READER_MIN_VERSION) {
|
||||||
// the version of the config file on disk is newer than what we can read
|
// the version of the config file on disk is newer than what we can read
|
||||||
fprintf(stderr, "WARNING: %s specifies configuration format version v%d, but this %s binary supports up to v%d\n.", fileName, this->config_version, PACKAGE, CONFIG_READER_MIN_VERSION);
|
fprintf(stderr, "WARNING: %s specifies configuration format\n", fileName);
|
||||||
fprintf(stderr, " The configuration version will be downgraded to v%d when %s exits.\n", CONFIG_READER_MIN_VERSION, PACKAGE);
|
fprintf(stderr, " version v%d, but this %s binary only supports up to version v%d.\n", this->config_version, PACKAGE, CONFIG_READER_MIN_VERSION);
|
||||||
|
fprintf(stderr, " The configuration file will be downgraded to v%d when %s exits.\n", CONFIG_READER_MIN_VERSION, PACKAGE);
|
||||||
String_freeArray(option);
|
String_freeArray(option);
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
return false;
|
return false;
|
||||||
@ -304,7 +336,7 @@ static bool Settings_read(Settings* this, const char* fileName, unsigned int ini
|
|||||||
String_freeArray(option);
|
String_freeArray(option);
|
||||||
}
|
}
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
if (!didReadMeters) {
|
if (!didReadMeters || !Settings_validateMeters(this)) {
|
||||||
Settings_defaultMeters(this, initialCpuCount);
|
Settings_defaultMeters(this, initialCpuCount);
|
||||||
}
|
}
|
||||||
return didReadAny;
|
return didReadAny;
|
||||||
@ -328,7 +360,7 @@ static void writeFields(FILE* fd, const ProcessField* fields, Hashtable* columns
|
|||||||
|
|
||||||
static void writeMeters(const Settings* this, FILE* fd, char separator, unsigned int column) {
|
static void writeMeters(const Settings* this, FILE* fd, char separator, unsigned int column) {
|
||||||
const char* sep = "";
|
const char* sep = "";
|
||||||
for (uint8_t i = 0; i < this->hColumns[column].len; i++) {
|
for (size_t i = 0; i < this->hColumns[column].len; i++) {
|
||||||
fprintf(fd, "%s%s", sep, this->hColumns[column].names[i]);
|
fprintf(fd, "%s%s", sep, this->hColumns[column].names[i]);
|
||||||
sep = " ";
|
sep = " ";
|
||||||
}
|
}
|
||||||
@ -337,7 +369,7 @@ static void writeMeters(const Settings* this, FILE* fd, char separator, unsigned
|
|||||||
|
|
||||||
static void writeMeterModes(const Settings* this, FILE* fd, char separator, unsigned int column) {
|
static void writeMeterModes(const Settings* this, FILE* fd, char separator, unsigned int column) {
|
||||||
const char* sep = "";
|
const char* sep = "";
|
||||||
for (uint8_t i = 0; i < this->hColumns[column].len; i++) {
|
for (size_t i = 0; i < this->hColumns[column].len; i++) {
|
||||||
fprintf(fd, "%s%d", sep, this->hColumns[column].modes[i]);
|
fprintf(fd, "%s%d", sep, this->hColumns[column].modes[i]);
|
||||||
sep = " ";
|
sep = " ";
|
||||||
}
|
}
|
||||||
@ -586,7 +618,7 @@ void Settings_setHeaderLayout(Settings* this, HeaderLayout hLayout) {
|
|||||||
} else if (newColumns < oldColumns) {
|
} else if (newColumns < oldColumns) {
|
||||||
for (unsigned int i = newColumns; i < oldColumns; i++) {
|
for (unsigned int i = newColumns; i < oldColumns; i++) {
|
||||||
if (this->hColumns[i].names) {
|
if (this->hColumns[i].names) {
|
||||||
for (uint8_t j = 0; j < this->hColumns[i].len; j++)
|
for (size_t j = 0; j < this->hColumns[i].len; j++)
|
||||||
free(this->hColumns[i].names[j]);
|
free(this->hColumns[i].names[j]);
|
||||||
free(this->hColumns[i].names);
|
free(this->hColumns[i].names);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - Settings.h
|
htop - Settings.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ in the source distribution for its full text.
|
|||||||
#define CONFIG_READER_MIN_VERSION 2
|
#define CONFIG_READER_MIN_VERSION 2
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t len;
|
size_t len;
|
||||||
char** names;
|
char** names;
|
||||||
int* modes;
|
int* modes;
|
||||||
} MeterColumnSetting;
|
} MeterColumnSetting;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - SignalsPanel.c
|
htop - SignalsPanel.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - SignalsPanel.h
|
htop - SignalsPanel.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - SwapMeter.c
|
htop - SwapMeter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - SwapMeter.h
|
htop - SwapMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - SysArchMeter.c
|
htop - SysArchMeter.c
|
||||||
(C) 2021 htop dev team
|
(C) 2021 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - SysArchMeter.h
|
htop - SysArchMeter.h
|
||||||
(C) 2021 htop dev team
|
(C) 2021 htop dev team
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
#include "Meter.h"
|
#include "Meter.h"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - TasksMeter.c
|
htop - TasksMeter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - TasksMeter.h
|
htop - TasksMeter.h
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - TraceScreen.c
|
htop - TraceScreen.c
|
||||||
(C) 2005-2006 Hisham H. Muhammad
|
(C) 2005-2006 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - TraceScreen.h
|
htop - TraceScreen.h
|
||||||
(C) 2005-2006 Hisham H. Muhammad
|
(C) 2005-2006 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
htop - UptimeMeter.c
|
htop - UptimeMeter.c
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
(C) 2004-2011 Hisham H. Muhammad
|
||||||
Released under the GNU GPLv2, see the COPYING file
|
Released under the GNU GPLv2+, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user