Christian Göttsche
bc16fa037f
Convert personal copyright authorship to team
5 years ago
Christian Göttsche
d1db9da936
Linux: avoid float division by 0 after system sleep
...
linux/LinuxProcessList.c:1403:63: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior linux/LinuxProcessList.c:1403:63 in
5 years ago
Christian Göttsche
fe84840314
Add Linux cwd process column
5 years ago
Christian Göttsche
b76eaf187a
Dynamically load libsensors at runtime
5 years ago
Christian Göttsche
f7a8952933
Add xReadfile wrapper for reading small to medium size files
...
Inspired by proposed Linux syscall
Avoid file descriptor leaks like 4af8c63f
5 years ago
Christian Göttsche
1d8192c10b
PressureStallMeter: improve display strings
...
- Shorten name for header setup menu
- Improve caption in bar mode
5 years ago
Christian Göttsche
c0b50164dd
Use String_eq for readability and consistency
5 years ago
Christian Göttsche
7975cd2ca3
Add cast to unsigned char to avoid signed char misuse
5 years ago
Christian Göttsche
9029cc83ad
Merge identical conditional branches
5 years ago
Christian Göttsche
43ee295c23
Drop redundant return statements
5 years ago
Christian Göttsche
9549ca8c88
Linux: fix process parsing for hidden pid directories
5 years ago
Christian Göttsche
5ee6875f73
Typo
5 years ago
Christian Göttsche
ea4f33409a
Update even more snprintfs
...
Use size of actual buffers instead of magic numbers
5 years ago
Benny Baumann
0b29e5074c
Use 'N/A' instead of 'no perm' for more consistency
5 years ago
Daniel Lange
6c306315c8
Fix reading of device nodes > 2 chars from memory maps
5 years ago
Christian Göttsche
2ff2859c23
Add compat mode for systems without openat(2)
5 years ago
Christian Göttsche
638207a2ff
LinuxProcessList: use openat instead of building path strings
...
openat() is available since Linux 2.6.16
5 years ago
Nathan Scott
f704baeb82
Drop unused global ProcessList memory fields
...
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.
5 years ago
Benny Baumann
2c27f1d9ab
Randomly refresh M_LRS calculation, but latest after 2s
5 years ago
Benny Baumann
08d6e25301
Distinguish display of no permissions for reading M_LRS
5 years ago
Benny Baumann
31044d1729
Roll our own strtoull implementation specialized to handle the parsing requirements
5 years ago
Benny Baumann
cceab5f803
Hardcode actual conversions to read the maps file data
5 years ago
Benny Baumann
721d9112d9
Only calculate M_LRS size every 5 seconds
5 years ago
Fynn Wulf
7f18b352b0
Calculate library size (M_LRS column) from maps file
5 years ago
Christian Göttsche
46a2e8ac63
IOPriorityPanel: drop unnecessary buffer size decrement
...
xSnprintf guarantees null-termination within the passed size.
5 years ago
Christian Göttsche
d62c2e9cca
LinuxProcessList_recurseProcTree: compute time only once and mark parent const
5 years ago
Christian Göttsche
9b31ee5b63
Drop taskstats conditional
...
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.
5 years ago
Christian Göttsche
c88c80e3bd
Drop cgroup conditional
...
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.
5 years ago
Christian Göttsche
c038326a70
LinuxProcessList: fix misspelling
5 years ago
Christian Göttsche
601ad61e7d
Unify naming of first argument of Platform_getBattery
...
Use percent throughout
5 years ago
Christian Göttsche
4af8c63f63
Fix file descriptor leak in LinuxProcessList_readCmdlineFile after xread failure
...
Found by Coverity
5 years ago
Benny Baumann
21e3063e2e
Include comm before cmdline if exe could not be read, but comm mismatches basename from cmdline
...
Also highlights entries where exe was marked deleted
5 years ago
Benny Baumann
46ee28e897
Refactor command string creation
...
Hopefully this patch makes it a bit more approachable how it's done.
5 years ago
Benny Baumann
27b36dab1a
Make kernel thread display for COMM/EXE columns less visible and more consistent
5 years ago
Benny Baumann
f0a232568f
Reduce visual noise to when comm and cmdline actually disagree on the program basename
5 years ago
Narendran Gopalakrishnan
dde2af1fdb
Assume full basename matches COMM when matching full COMM buffer
5 years ago
Narendran Gopalakrishnan
be60419630
Cleanup some documentation
5 years ago
Benny Baumann
fcda517a67
Add heuristic for space-separated cmdline
5 years ago
Benny Baumann
98fce1fb43
Compatibility function for faccessat
5 years ago
Narendran Gopalakrishnan
09fe94da18
Improving Command display/sort
5 years ago
Christian Göttsche
42c842c190
LinuxProcess_adjustTime: simplify by not using double
...
Does not work with -ffast-math else.
5 years ago
Christian Göttsche
952ee9cd77
LinuxProcessList: fix misspelling
5 years ago
Christian Göttsche
6c2849ec81
Linux: fix display of new thread for one cycle when hidden
5 years ago
Christian Göttsche
17eeb7573a
LinuxProcessList: skip parsing threads if the kind of thread is disabled
5 years ago
Benny Baumann
03f9a86918
Reduce scope of local variables
5 years ago
Christian Göttsche
fa002c0ba9
Rename virtual memory column from M_SIZE to M_VIRT
...
Closes : #325
5 years ago
Christian Göttsche
3e5cba91ce
LinuxProcess: mark LinuxProcess_printDelay static
5 years ago
Christian Göttsche
7cf5277594
IWYU update (Linux)
5 years ago
Nathan Scott
5d50f43d5f
Add whitespace to improve Linux Platform_init readability
5 years ago
Nathan Scott
c75c5ef9c6
Minor cleanups to platform-specific init and done
...
Move platform-specific code out of the htop.c main function
and into the platform sub-directories - primarily this is
the Linux procfs path check and sensors setup/teardown; not
needed on any other platforms. No functional changes here.
5 years ago