summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcessList.h
Commit message (Collapse)AuthorAgeFilesLines
* Dynamically load libsensors at runtimeChristian Göttsche2020-12-021-1/+1
|
* Show CPU temperature in CPU meterChristian Göttsche2020-11-161-0/+4
| | | | | Show the CPU temperature in the CPU meter, like CPU frequency, instead of using an extra Meter.
* Spacing around operatorsBenny Baumann2020-11-021-1/+1
|
* Zram Meter featureMurloc Knight2020-10-311-0/+3
|
* Continue to update generic data in paused modeChristian Göttsche2020-10-191-1/+1
| | | | | | | | | Generic data, as CPU and memory usage, are used by Meters. In paused mode they would stop receiving updates and especially Graph Meters would stop showing continuous data. Improves: #214 Closes: #253
* Make all required includes explicitBenny Baumann2020-10-181-0/+7
| | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
|
* Drop redundant declarationsChristian Göttsche2020-09-291-2/+0
| | | | | | | | - `CRT_fatalError()` is declared twice in CRT.h - `Process_pidFormat`, `Process_writeField()` and `Process_compare` are declared twice in Process.h - `btime` is defined in LinuxProcess.c and also declared in LinuxProcess.h, so drop in LinuxProcessList.h
* Switch variable/field naming from WhiteList to MatchListNathan Scott2020-09-091-1/+1
|
* Consolidate repeated macro definitions into one headerNathan Scott2020-09-091-4/+0
| | | | | | | | The MIN, MAX, CLAMP, MINIMUM, and MAXIMUM macros appear throughout the codebase with many re-definitions. Make a single copy of each in a common header file, and use the BSD variants of MINIMUM/MAXIMUM due to conflicts in the system <sys/param.h> headers.
* Further, minor cleanups to headers post-MakeHeadersNathan Scott2020-09-081-34/+0
| | | | | Remove leftover empty ifdef/endif pairs, whitespace. The generated htop.h file was also unused - removed.
* Remove superfluous 'extern's from function declarations.Zev Weiss2020-09-031-3/+3
| | | | | | | | Applied via: $ find * -name '*.h' -exec sed -i -r 's/^extern (.+\()/\1/;' {} + Suggested-by: Bert Wesarg <bert.wesarg@googlemail.com>
* Axe automated header generation.Zev Weiss2020-09-031-2/+0
| | | | | | | | | | | | | | Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
* Merge branch 'hishamhm-pull-920'3.0.0rc1Nathan Scott2020-08-201-0/+7
|\
| * Refactor common OpenZFS sysctl accessRoss Williams2019-07-071-8/+2
| | | | | | | | | | Darwin and FreeBSD export zfs kstats through the same APIs, so moving functions into a common file.
| * ZFS arcstats for LinuxRoss Williams2019-07-071-0/+13
| | | | | | | | | | | | If no pools are imported (ARC size == 0) or the ZFS module is not in the kernel (/proc/spl/kstat/zfs/arcstats does not exist), then the Meter reports "Unavailable".
* | Merge branch 'hishamhm-pull-932'Nathan Scott2020-08-201-0/+6
|\ \
| * | Move sysfs-reading code to LinuxProcessList.c and add average frequency.Arnavion2019-08-101-0/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way the frequency is read from sysfs only once per update cycle instead of every time the UI is redrawn. This also changes the code to read from /proc/cpuinfo instead. This is because reading from scaling_cur_freq stalls for 10ms if the previous read for the file was more than one second ago. [1] Since htop's update cycle is longer than that, it would cause the read of each CPU's scaling_cur_freq file to block the UI for 20ms. This easily led to a noticeable half-second lag on a 20+ CPU machine. /proc/cpuinfo also has a 10ms delay, but this applies for the whole file so the delay does not scale with the number of CPUs. [2] [1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4815d3c56d1e10449a44089a47544d9ba84fad0d [2]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7d5905dc14a87805a59f3c5bf70173aac2bb18f8
* | Merge branch 'hishamhm-pull-960'Nathan Scott2020-08-201-3/+3
|\ \
| * | Clean up existing whitespaceDaniel Flanagan2019-10-311-3/+3
| |/
* | Merge branch 'hishamhm-pull-866'Nathan Scott2020-08-201-2/+1
|\ \
| * | Remove unnecessary HAVE_SYS_SYSMACROS_H checkWataru Ashihara2018-12-151-2/+1
| |/ | | | | | | | | | | | | | | | | | | | | HAVE_SYS_SYSMACROS_H is always true if MAJOR_IN_SYSMACROS. This way of checking is recommended in autoconf 2.70 documentation: https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blobdiff;f=doc/autoconf.texi;h=4f041bd4e;hp=9ad7dc1c5f02c8ba25b2fe1218bf931c7113a5d5;hb=e17a30e987d7ee695fb4294a82d987ec3dc9b974;hpb=565a6dc50cfa01cec2fb4db894026689cdf4970c NOTE: currently https://www.gnu.org/software/autoconf/manual/autoconf.html is the doc for autoconf 2.69.
* | Merge branch 'hishamhm-pull-843'Nathan Scott2020-08-191-0/+1
|\ \
| * | Linux: Use /proc/*/smaps_rollup for improved PSS parsing speedAlexander Schlarb2019-03-201-0/+1
| |/
* / Re-generate all headers with latest scripts/MakeHeader.pyNathan Scott2020-08-181-3/+3
|/ | | | Sync-up missing extern declarations for many functions.
* Linux: add process->starttime and use it for STARTTIME column (#700)Shawn Landden2018-08-191-1/+3
| | | | | | | this way a remount of /proc will not reset starttimes and we can also see startup times for processes started before the mount of /proc also record btime (boot time in seconds since epoch) as Linux semi-global
* Updates to generated header filesHisham Muhammad2018-02-261-0/+5
|
* Adds support for linux delay accounting (#667)André Carvalho2017-12-041-0/+15
| | | | | | Adds support for showing columns with linux delay accounting. This information can be read from the netlink interface, and thus we set up a socket to read from that when initializing the LinuxProcessList (LinuxProcessList_initNetlinkSocket). After that, for each process we call LinuxProcessList_readDelayAcctData, which sends a message thru the socket after setting up a callback to get the answer from the Kernel. That callback sets the process total delay time attribute. We then set the delay percent as the percentage of time process cpu time since last scan.
* Interpret TTY_NR column on Linux,Hisham2016-10-011-3/+15
| | | | | translate dev_t to major:minor on other platforms. Closes #316.
* Introduce CLAMP macro. Unify all MIN(MAX(a,b),c) uses.Explorer092016-01-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | With the CLAMP macro replacing the combination of MIN and MAX, we will have at least two advantages: 1. It's more obvious semantically. 2. There are no more mixes of confusing uses like MIN(MAX(a,b),c) and MAX(MIN(a,b),c) and MIN(a,MAX(b,c)) appearing everywhere. We unify the 'clamping' with a single macro. Note that the behavior of this CLAMP macro is different from the combination `MAX(low,MIN(x,high))`. * This CLAMP macro expands to two comparisons instead of three from MAX and MIN combination. In theory, this makes the code slightly smaller, in case that (low) or (high) or both are computed at runtime, so that compilers cannot optimize them. (The third comparison will matter if (low)>(high); see below.) * CLAMP has a side effect, that if (low)>(high) it will produce weird results. Unlike MIN & MAX which will force either (low) or (high) to win. No assertion of ((low)<=(high)) is done in this macro, for now. This CLAMP macro is implemented like described in glib <http://developer.gnome.org/glib/stable/glib-Standard-Macros.html> and does not handle weird uses like CLAMP(a++, low++, high--) .
* Extend buffer for reading lines from /proc.Hisham Muhammad2015-12-141-0/+4
| | | | | Apparently a line longer than 255 chars was spotted in the wild: http://serverfault.com/questions/577939/linux-ps-htop-show-processes-running-for-hundreds-or-thousands-of-days-though-h#comment676098_577939
* Enable OOM support unconditionally on Linux.Hisham Muhammad2015-04-091-4/+0
| | | | | Read OOM data only if column is enabled. Make sort ordering more consistent. Closes #182.
* Build fixes to resync with FreeBSD changes.Hisham Muhammad2015-03-161-7/+1
|
* Linux build fixes.Hisham Muhammad2015-03-161-10/+0
|
* Sorry about the mega-patch.Hisham Muhammad2015-01-211-3/+53
| | | | | This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
* Move platform-dependent parts of Linux battery meter.Hisham Muhammad2014-11-271-0/+56

© 2014-2024 Faster IT GmbH | imprint | privacy policy