summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-07-14Ensure PCP dynamic metric configuration definition uniquenessNathan Scott
It can happen that pcp-htop is presented multiple definitions of the same dynamic meter, e.g. if /etc/pcp/htop/meters has a definition matching one in ~/.config/htop/meters - instead of exiting with a duplicate metric error provide more meaningful diagnostics (on close) and also just skip over such entries. System files override home directories which overrides those found below the current working directory. Also fix the derived metric error diagnostic; because this is using CRT_fatalError, which is like perror(3), we must give a meaningful prefix (like program name) at the string end.
2021-07-14Ensure we do not attempt to add a DynamicMeter via theNathan Scott
htoprc that we didn't find during start up. This just leaves blank sections of the display as @smalinux found. Related to https://github.com/htop-dev/htop/pull/682
2021-07-13Add SIGINT handlerBenny Baumann
This SIGINT handler is installed on top of an optional handler that some curses/ncurses implementations provide. This ensures the curser is properly reset when hitting Ctrl+C.
2021-07-13netbsd: Support building with libcursesnia
Right now Unicode support must be disabled, because htop peeks into the ncurses cchar_t struct with Unicode enabled. NetBSD's cchar_t has different contents. Partially fixes #660 Signed-off-by: Nia Alarie <nia@NetBSD.org>
2021-07-13netbsd: Fix display of in-use and cached memorynia
2021-07-13netbsd: Add dyanmicMeters stubs to fix the buildnia
Signed-off-by: Nia Alarie <nia@NetBSD.org>
2021-07-09Remove unnecessary include files from PCPDynamicMeter.cNathan Scott
Also resolve a few unintended style guide transgressions in the PCP platform code.
2021-07-08Remove references to bintray in the README, no longer existsNathan Scott
2021-07-08Pretty-print values in the PCP DynamicMeter codeNathan Scott
Several improvements to the way values are displayed in the PCP platform DynamicMeter implementation: - handle the initial 'caption' setting as with regular meters, this required a new meter callback because we no longer have just a single meter caption for the DynamicMeter case - if no label is provided for a metric in a configuration file use the short form metric name as a fallback - honour the suffix setting in the configuration file - convert metric values to the canonical units for htop (kbyte and seconds), and use Meter_humanUnit when it makes sense to do so. Also improves the handling of fatal string error messages in a couple of places, thanks to BenBE for the review feedback.
2021-07-07Remove Linux-specific cpp conditional in SwapMeter.cNathan Scott
Instead use the common NAN pattern to use of the swap cached value on platforms that do not support it.
2021-07-07Add more defensive checks to PCP paths if sampling failsNathan Scott
2021-07-07PCP: use palette meter text colour for dynamic meter labelsSohaib Mohamed
2021-07-07Add a new DynamicMeter class for runtime Meter extensionNathan Scott
This commit is based on exploratory work by Sohaib Mohamed. The end goal is two-fold - to support addition of Meters we build via configuration files for both the PCP platform and for scripts ( https://github.com/htop-dev/htop/issues/526 ) Here, we focus on generic code and the PCP support. A new class DynamicMeter is introduced - it uses the special case 'param' field handling that previously was used only by the CPUMeter, such that every runtime-configured Meter is given a unique identifier. Unlike with the CPUMeter this is used internally only. When reading/writing to htoprc instead of CPU(N) - where N is an integer param (CPU number) - we use the string name for each meter. For example, if we have a configuration for a DynamicMeter for some Redis metrics, we might read and write "Dynamic(redis)". This identifier is subsequently matched (back) up to the configuration file so we're able to re-create arbitrary user configurations. The PCP platform configuration file format is fairly simple. We expand configs from several directories, including the users homedir alongside htoprc (below htop/meters/) and also /etc/pcp/htop/meters. The format will be described via a new pcp-htop(5) man page, but its basically ini-style and each Meter has one or more metric expressions associated, as well as specifications for labels, color and so on via a dot separated notation for individual metrics within the Meter. A few initial sample configuration files are provided below ./pcp/meters that give the general idea. The PCP "derived" metric specification - see pmRegisterDerived(3) - is used as the syntax for specifying metrics in PCP DynamicMeters.
2021-07-07Fix an assert on kernel process name length on the PCP platformNathan Scott
2021-07-07Fix bitmask used to extract CPU identifier for CPUMeterNathan Scott
When manipulating CPUMeters in the AvailableMeterPanel we use the bottom 16 bits to hold the CPU number. However, the bitmask used to extract the CPU number only masks the lower 8 bits (0xff).
2021-07-06Check for alloc_size attribute in configure.acBenny Baumann
2021-07-05Merge branch 'solaris-define-fixes' of BenBE/htopDaniel Lange
Tested on OmniOS v11 r151036
2021-07-05Merge branch 'check-set-escdelay' of BenBE/htopDaniel Lange
2021-07-04Reduce visibility of GZONE and UZONEBenny Baumann
Fixes #624
2021-07-04Remove unused define on SolarisBenny Baumann
2021-07-04Check for set_escdelay in ncursesBenny Baumann
2021-07-01Fix typo in Generic_gettime_realtime on old MacBenny Baumann
Fixes #673
2021-06-30PCP: Fix minor cut+paste typoSohaib Mohamed
2021-06-26Always update `proc->st_uid` + `proc->user`BenBE
Avoids issue #661.
2021-06-26Redo the memory values based on the other BSD implementations.fraggerfox
2021-06-26Adds support for counting user and kernel threads.fraggerfox
2021-06-26Adds support for PROC_EXE and CWD.fraggerfox
2021-06-26Adds the ELAPSED column for NetBSD.fraggerfox
Additional details regarding ELAPSED column can be found in #627.
2021-06-26Fixes minor whitespace issues and re-arrange headers to conform to style guide.fraggerfox
2021-06-26Implements the NetBSD specific changes for makeCommandStr refactor.fraggerfox
Refer to #388 PR for more details.
2021-06-26Sets a non-NULL process state in case of kvm_getlwps(3) returns NULL. Thanks ↵fraggerfox
@cgzone.
2021-06-26Replaces WRAP_SUBTRACT with saturatingSub inline function to reduce code ↵fraggerfox
duplication.
2021-06-26Refactor saturatingSub() to be part of Macros.hfraggerfox
2021-06-26Renames variable from opl to npl for consistency.fraggerfox
2021-06-26Fix include paths and minor whitespace issuesfraggerfox
2021-06-26Replace strlcpy() by safer String_safeStrncpy()fraggerfox
2021-06-26Replace maximum_PID value with INT32_MAXfraggerfox
Thank you @niacat.
2021-06-26Update README for NetBSDfraggerfox
2021-06-26Remove unwanted code, updates the commentsfraggerfox
2021-06-26Update copyright noticesBenny Baumann
2021-06-26Minor code clean up and corrections.fraggerfox
2021-06-26Sync changes from master and fix minor warningsfraggerfox
2021-06-26Add NetBSD platform support without procfs dependencyfraggerfox
- TODO, clean up the code base and update comments in code.
2021-06-26Add a section on PRs for the styleguideBenny Baumann
2021-06-22Unsupported: Remark on expectation of username field updateBenny Baumann
2021-06-22Solaris: Always update usernameBenny Baumann
2021-06-22PCP: Always update usernameBenny Baumann
2021-06-22OpenBSD: Always update usernameBenny Baumann
2021-06-22Darwin: Always update usernameBenny Baumann
2021-06-18Change 3.0.6-dev -> 3.1.0-devDaniel Lange