| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This affects:
- PROC_COMM, PROC_EXE and CWD on Linux
- JAIL on FreeBSD and DragonFlyBSD
- ZONE on Solaris
|
|
|
|
|
|
|
| |
They do not clean up the ncurses environment, leaving the terminal in a
broken state.
Also drop bare usage of exit(3).
|
|
|
| |
sys/dirent.h is included by dirent.h in FreeBSD, and does not exist in Debian GNU/kFreeBSD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Note that xStrdup always returns non-NULL, thus the one error case cannot be reached.
|
| |
|
| |
|
|
|
|
| |
Closes: #325
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Name first argument of ProcessList_goThroughEntries consistently super
Name first argument of ProcessList_new consistently userTable
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
Continue to update generic data in paused mode
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
| |
man:sysconf(3) states:
The values obtained from these functions are system configuration constants.
They do not change during the lifetime of a process.
|
|
|
|
| |
Information as seen by IWYU 0.12 + clang 9 on Linux
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This issue was previously hidden as xSnprintf expanded to only one large command that didn't trigger the GCC formatting check.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC10 and Clang11 now default to -fno-common.
ld: error: duplicate symbol: jail_errmsg
>>> defined at Platform.c
>>> freebsd/Platform.o:(jail_errmsg)
>>> defined at FreeBSDProcessList.c
>>> freebsd/FreeBSDProcessList.o:(.bss+0x90)
Signed-off-by: Tobias Kortkamp <t@tobik.me>
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
openzfs_sysctl_init() now returns void instead of int.
The ZfsArcStats->enabled flag is set inside the init function
now, instead of having to be set from its return value.
Preparation for more flag setting in Compressed ARC commit.
ZfsArcMeter_readStats() added and all Meter->values[] setting
moved to it, eliminating duplicated code in
{darwin,freebsd,linux,solaris}/Platform.c.
|
| |
| |
| |
| |
| | |
Darwin and FreeBSD export zfs kstats through the
same APIs, so moving functions into a common file.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New meter displays same ARC stats as FreeBSD top(1).
Can be extended to other platforms that support ZFS.
Pulling kstat.zfs.misc.arcstats.c_max as the meter
total, so the meter has a meaningful value to work
up to.
The Text meter displays, first, the maximum
ARC size (Meter.total), then second, the total
ARC used, using the difference between Meter.maxItems
and Meter.curItems to "hide" the used value from the
Bar and Graph drawing functions by using an index
in Meter.values[] that is beyond curItems - 1, but
less than maxItems - 1.
|
| |
| |
| |
| |
| | |
Could have resulted in a buffer overflow if the
FreeBSD kernel returned more bytes than expected.
|
|\ \ |
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Use the appropriate types when calling sysctl().
Currently, `unsigned long long int` is used for all sizes and on
FreeBSD/powerpc this causes all sysctl() calls in scanMemoryInfo()
to fail as they are actually of different sizes on powerpc, where
(sizeof(unsigned long long int), sizeof(u_long)) == (8, 4)
vs (8, 8) on amd64. This results in bogus memory sizes being
reported by htop.
Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
|
|
|
|
|
| |
Calls marked with xSnprintf shouldn't fail.
Abort program cleanly if any of them does.
|
|
|
|
| |
Closes #546.
|
|\
| |
| | |
FreeBSD: fix multithreaded CPU% in process list
|
| |
| |
| |
| | |
LWPs
|