summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcessList.c
Commit message (Collapse)AuthorAgeFilesLines
* Hashtable: use more distinct typename for key typeChristian Göttsche2021-01-061-1/+1
|
* XUtils: check for multiplication overflow in allocation sizeChristian Göttsche2021-01-021-2/+2
|
* Only initialize and gather delay accounting data if a related column is enabledChristian Göttsche2021-01-011-12/+21
| | | | | Avoid creating and communicating over a netlink socket by default, which triggers cap_net_admin checks as root.
* Linux: accept clock CPU frequencyChristian Göttsche2020-12-231-1/+3
| | | | | | | | | processor : 0 cpu : POWER8 (architected), altivec supported clock : 4024.000000MHz revision : 2.0 (pvr 004d 0200) Closes: #424
* Make remaining number literals use uppercaseBenny Baumann2020-12-201-1/+1
|
* Use upper case numeric literalsChristian Göttsche2020-12-201-2/+2
| | | | See https://rules.sonarsource.com/c/RSPEC-818
* Handle absence of package CPU temperatureChristian Göttsche2020-12-141-36/+1
| | | | Resolves: #389
* Harden the extraction of boot time for the Linux platformNathan Scott2020-12-141-12/+11
| | | | | | | | | There is a possible path - albeit theoretical really - through the btime initialization code in Linux ProcessList_new(), when String_startsWith() is always false, which can result in btime not being initialized. This commit refactors the code to remove that possibility.
* Cleanup initialization of jiffies on the Linux platformNathan Scott2020-12-141-15/+15
| | | | | | | | | | Small cleanups - add error handling, remove a local static variable and refactor LinuxProcess_adjustTime (also rename it, as its in LinuxProcessList.c not LinuxProcess.c) - and while there, move the related 'btime' global variable into LinuxProcessList.c so it can be made static. Resolves https://github.com/htop-dev/htop/issues/384
* Simplify initialization of the Linux haveSmapsRollup variableNathan Scott2020-12-141-8/+2
|
* Define O_PATH if not already definedChris Burr2020-12-131-0/+6
|
* Cull the definitions of pageSize and pageSizeKB from CRT.cNathan Scott2020-12-101-2/+11
| | | | | | | | | | | | | | | By storing the per-process m_resident and m_virt values in the form htop wants to display them in (KB, not pages), we no longer need to have definitions of pageSize and pageSizeKB in the common CRT code. These variables were never really CRT (i.e. display) related in the first place. It turns out the darwin platform code doesn't need to use these at all (the process values are extracted from the kernel in bytes not pages) and the other platforms can each use their own local pagesize variables, in more appropriate locations. Some platforms were actually already doing this, so this change is removing duplication of logic and variables there.
* IWYU updateChristian Göttsche2020-12-061-3/+2
|
* Initialize buffer for retrieved pathBenny Baumann2020-12-061-1/+2
| | | | | | This avoids a warning on GCC 11. Fixes #369
* LinuxProcessList: add underscore suffix for raw struct nameChristian Göttsche2020-12-051-1/+1
| | | | Fit the general coding style
* Linux: avoid float division by 0 after system sleepChristian Göttsche2020-12-031-2/+3
| | | | | linux/LinuxProcessList.c:1403:63: runtime error: division by zero SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior linux/LinuxProcessList.c:1403:63 in
* Add Linux cwd process columnChristian Göttsche2020-12-031-0/+29
|
* Dynamically load libsensors at runtimeChristian Göttsche2020-12-021-40/+6
|
* Add xReadfile wrapper for reading small to medium size filesChristian Göttsche2020-12-021-77/+16
| | | | | | Inspired by proposed Linux syscall Avoid file descriptor leaks like 4af8c63f
* Use String_eq for readability and consistencyChristian Göttsche2020-12-021-3/+3
|
* Add cast to unsigned char to avoid signed char misuseChristian Göttsche2020-12-021-1/+1
|
* Merge identical conditional branchesChristian Göttsche2020-12-021-3/+1
|
* Linux: fix process parsing for hidden pid directoriesChristian Göttsche2020-11-291-2/+2
|
* Fix reading of device nodes > 2 chars from memory mapsDaniel Lange2020-11-281-4/+4
|
* Add compat mode for systems without openat(2)Christian Göttsche2020-11-281-41/+63
|
* LinuxProcessList: use openat instead of building path stringsChristian Göttsche2020-11-281-96/+97
| | | | openat() is available since Linux 2.6.16
* Drop unused global ProcessList memory fieldsNathan Scott2020-11-271-3/+3
| | | | | | | | | | The global ProcessList structure contains a couple of unused fields. 'sharedMem' has never been used by any Meter, since its not been anything other than zero in Linux /proc/meminfo for many, many years. The freeMem field is only used in the usedMem calculation, so it can reside on the stack like some other memory variables used within-calculations-only and not exposed to the user via a Meter.
* Randomly refresh M_LRS calculation, but latest after 2sBenny Baumann2020-11-261-8/+7
|
* Roll our own strtoull implementation specialized to handle the parsing ↵Benny Baumann2020-11-261-20/+54
| | | | requirements
* Hardcode actual conversions to read the maps file dataBenny Baumann2020-11-261-8/+49
|
* Only calculate M_LRS size every 5 secondsBenny Baumann2020-11-261-3/+21
|
* Calculate library size (M_LRS column) from maps fileFynn Wulf2020-11-261-2/+74
|
* LinuxProcessList_recurseProcTree: compute time only once and mark parent constChristian Göttsche2020-11-251-5/+6
|
* Drop taskstats conditionalChristian Göttsche2020-11-251-12/+1
| | | | | | | | | | taskstats is only checked on runtime if the column RCHAR, WCHAR, SYSCR, SYSCW, RBYTES, WBYTES, CNCLWB, IO_READ_RATE, IO_WRITE_RATE or IO_RATE is selected. taskstats is currently enabled by default. Drop the taskstats configuration switch, to reduce the maintenance cost.
* Drop cgroup conditionalChristian Göttsche2020-11-251-6/+0
| | | | | | | | | cgroup is only checked on runtime if the column CGROUP is selected. cgroup is currently disabled by default, but most distributions do enable it. Drop the cgroup configuration switch, to reduce the maintenance cost.
* LinuxProcessList: fix misspellingChristian Göttsche2020-11-251-5/+5
|
* Fix file descriptor leak in LinuxProcessList_readCmdlineFile after xread failureChristian Göttsche2020-11-241-1/+3
| | | | Found by Coverity
* Include comm before cmdline if exe could not be read, but comm mismatches ↵Benny Baumann2020-11-241-0/+10
| | | | | | basename from cmdline Also highlights entries where exe was marked deleted
* Add heuristic for space-separated cmdlineBenny Baumann2020-11-241-5/+91
|
* Compatibility function for faccessatBenny Baumann2020-11-241-0/+1
|
* Improving Command display/sortNarendran Gopalakrishnan2020-11-241-4/+73
|
* LinuxProcess_adjustTime: simplify by not using doubleChristian Göttsche2020-11-241-8/+6
| | | | Does not work with -ffast-math else.
* LinuxProcessList: fix misspellingChristian Göttsche2020-11-241-1/+1
|
* Linux: fix display of new thread for one cycle when hiddenChristian Göttsche2020-11-231-2/+3
|
* LinuxProcessList: skip parsing threads if the kind of thread is disabledChristian Göttsche2020-11-221-2/+23
|
* Reduce scope of local variablesBenny Baumann2020-11-221-2/+1
|
* Rename virtual memory column from M_SIZE to M_VIRTChristian Göttsche2020-11-211-1/+1
| | | | Closes: #325
* Spelling correctionsChristian Göttsche2020-11-181-1/+1
|
* Show CPU temperature in CPU meterChristian Göttsche2020-11-161-0/+78
| | | | | Show the CPU temperature in the CPU meter, like CPU frequency, instead of using an extra Meter.
* Use spaceship comparison for TTYsChristian Göttsche2020-11-151-1/+6
|

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