summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-08-13PCP: support for 'dynamic columns' added at runtimeSohaib Mohamed
Implements support for arbitrary Performance Co-Pilot metrics with per-process instance domains to form new htop columns. The column-to-metric mappings are setup using configuration files which will be documented via man pages as part of a follow-up commit. We provide an initial set of column configurations so as to provide new capabilities to pcp-htop: including configs for containers, open fd counts, scheduler run queue time, tcp/udp bytes/calls sent/recv, delay acct, virtual machine guests, detailed virtual memory, swap. Note there is a change to the configuration file path resolution algorithm introduced for 'dynamic meters'. First, look in any custom PCP_HTOP_DIR location. Then iterate, in priority order, users home directory, then local sysadmins files in /etc/pcp/htop, then readonly configuration files below /usr/share/pcp/htop. This final location becomes the preferred place for our own shipped meter and column files. The Settings file (htoprc) writing code is updated to not using the numeric identifier for dynamic columns. The same strategy used for dynamic meters is used here where we write Dynamic(name) so the name can be setup once more at start. Regular (static) columns writing to htoprc - i.e. numerically indexed - is unchanged.
2021-08-02Merge branch 'cpu_count' of cgzones/htopDaniel Lange
2021-08-02Properly handle multiple batteries on darwinBenny Baumann
This makes the behaviour consistent with other platforms where AC is marked as present if at least one power source is marked as AC_PRESENT. Fixes: #711
2021-08-02Makefile.am fix that actually does a proper substitutionBenny Baumann
2021-08-02Fix portability issue in Makefile.amBenny Baumann
Fixes #662
2021-07-29PCP: fix per-process user and system time conversionsNathan Scott
2021-07-29PCP: use the correct metric for shared memory calculationsNathan Scott
2021-07-21Fix indentation stylenia
2021-07-21netbsd: convert snprintf use to xSnprintfnia
2021-07-21netbsd: re-initialize freqSize before sysctlbyname()nia
2021-07-21netbsd: Remove conditional compilation of CPU frequency variablesnia
2021-07-21netbsd: Support display of CPU frequencynia
2021-07-18Merge branch 'fix-dragon' of smalinux/htopDaniel Lange
2021-07-18DragonFlyBSD: fixup: ProcessList_new declaration & definition mismatchSohaib Mohamed
2021-07-18PCP: fixup: missing setter for isUserlandThreadSohaib Mohamed
fixes the color of PROC_COMM for PCP...
2021-07-18Merge branch 'show-thread-names-fix' of BenBE/htopDaniel Lange
2021-07-18PCP: fixup: Missing headers for DynamicMeterSohaib Mohamed
2021-07-18OpenBSD: support offline CPUs and hot-swappingChristian Göttsche
2021-07-18OpenBSD: fix compile errorsChristian Göttsche
openbsd/OpenBSDProcessList.c:176:56: error: no member named 'ki_pid' in 'struct kinfo_proc'; did you mean 'p_pid'? const int mib[] = { CTL_KERN, KERN_PROC_CWD, kproc->ki_pid }; ^~~~~~ p_pid /usr/include/sys/sysctl.h:375:10: note: 'p_pid' declared here int32_t p_pid; /* PID_T: Process identifier. */ ^ openbsd/OpenBSDProcessList.c:458:33: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare] if (opl->cpus[i].cpuIndex == id) ~~~~~~~~~~~~~~~~~~~~~ ^ ~~
2021-07-18Solaris: support offline CPUs and hot-swappingChristian Göttsche
Example hot-swapping: psradm -F -f 2
2021-07-18DragonFlyBSD: calculate whether to show entry lastChristian Göttsche
Wait until it has been decided what kind of task the entry actually is.
2021-07-18DragonFlyBSD: drop void TODOChristian Göttsche
2021-07-18Enable affinity support for non-LinuxChristian Göttsche
sched_getaffinity() and sched_setaffinity() are also available on BSDs. Remove the Linux restraint.
2021-07-18FreeBSD: mark the original kernel thread with pid 0 as suchChristian Göttsche
2021-07-18FreeBSD: calculate whether to show entry lastChristian Göttsche
Wait until it has been decided what kind of task the entry actually is.
2021-07-18FreeBSD: skip exe check for kernel threadChristian Göttsche
Kernel threads do not have an executable and the check can result in garbage values as unprivileged user.
2021-07-18UptimeMeter: treat all non-positive values as errorChristian Göttsche
Bogus uptime measurements can result in wrap-arounds, leading to negative garbage values printed.
2021-07-18Add ProcessList_isCPUonlineChristian Göttsche
2021-07-18Rework CPU countingChristian Göttsche
Currently htop does not support offline CPUs and hot-swapping, e.g. via echo 0 > /sys/devices/system/cpu/cpu2/online Split the current single cpuCount variable into activeCPUs and existingCPUs. Supersedes: #650 Related: #580
2021-07-17Respect "Show custom thread names" settingBenny Baumann
2021-07-16Minor README wordsmithing on review of recent deps/build changesNathan Scott
2021-07-16Merge branch 'README-update' of https://github.com/Eideen/htop into ↵Nathan Scott
Eideen-README-update
2021-07-15Disable mouse option when support is unavailablenia
2021-07-15netbsd: Support curses libraries without ncurses mouse supportnia
This adds a configure check for the ncurses getmouse() function and disables mouse-related code paths when mouse support is not present in the curses library. This is necessary for stable versions of NetBSD's libcurses, the development version has stub mouse functions for compatibility with ncurses. Signed-off-by: Nia Alarie <nia@NetBSD.org>
2021-07-15Use PATH lookup for systemctl in systemd meterScott Olson
Before this change, the systemd meter was broken on distros like NixOS, which have systemctl in PATH, but not at /bin/systemctl. After the change, it works on all my NixOS machines.
2021-07-15Proper label indentationBenny Baumann
2021-07-15Align descriptive commentsBenny Baumann
2021-07-15Pointer indication aligned to typenameBenny Baumann
2021-07-15Indentation of string argumentsBenny Baumann
2021-07-15Whitespace around operatorsBenny Baumann
2021-07-15Code indentationBenny Baumann
2021-07-15Split statements that should go onto multiple linesBenny Baumann
2021-07-15netbsd: update README.md (#694)nia
netbsd: update README.md
2021-07-15Merge pull request #695 from smalinux/zfs-orgnizNathan Scott
PCP: cleanup: put ZFS in its rightful place
2021-07-15PCP: cleanup: put ZFS in its rightful placeSohaib Mohamed
`PCPProcessList_updateHeader` for all meters...
2021-07-14Fix whitespace oddity in previous DynamicMeter updatesNathan Scott
Thanks @BenBE for noticing.
2021-07-14Improve the DynamicMeter_search API to make 'key' optionalNathan Scott
Thanks to @BenBE for the suggestion.
2021-07-14Additional pointer checks in dynamic meter code for CoverityNathan Scott
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