summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcess.h
Commit message (Collapse)AuthorAgeFilesLines
* Linux: add process column whether it is marked a container processChristian Göttsche2024-04-061-0/+1
| | | | | Might be useful for some users and for debugging the hideRunningInContainer detection.
* Linux: scan GPU based on previous activityChristian Göttsche2024-03-271-0/+2
| | | | | | Instead of ignoring the standard file descriptors 0, 1 and 2 scan for GPU usage of a process only if that process had activity last cycle or its last scan was more than five seconds ago.
* Linux: add GPU meter and process columnChristian Göttsche2024-03-271-0/+6
| | | | | | | Based on the DRM client usage stats[1] add statistics for GPU time spend and percentage utilization. [1]: https://www.kernel.org/doc/html/latest/gpu/drm-usage-stats.html
* Relocate include of config.h from header to source modeuleBenny Baumann2023-12-261-2/+0
|
* Update includes based on IWYUBenny Baumann2023-12-261-1/+2
|
* Add column for process container nameBenny Baumann2023-12-111-0/+1
|
* Linux + PCP: Add private memory size columnBowDown0972023-11-241-0/+1
|
* Merge branch 'style-header-consistency' of https://github.com/BenBE/htop ↵Nathan Scott2023-10-101-1/+1
|\ | | | | | | into BenBE-style-header-consistency
| * Make header sort order consistent againBenny Baumann2023-05-241-1/+1
| |
* | Introduce Row and Table classes for screens beyond top-processesNathan Scott2023-08-301-3/+3
|/ | | | | | | | | This commit refactors the Process and ProcessList structures such they each have a new parent - Row and Table, respectively. These new classes handle screen updates relating to anything that could be represented in tabular format, e.g. cgroups, filesystems, etc, without us having to reimplement the display logic repeatedly for each new entity.
* Introduce Machine class for host-specific info (split from ProcessList)Nathan Scott2023-05-081-2/+2
| | | | | | | | | | | First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes.
* Compress cgroup names based on some heuristicsBenny Baumann2021-11-281-0/+1
|
* Linux: use proper way to detect kernel threadsRin Cat (鈴猫)2021-11-091-0/+3
| | | | | | Use PF_KTHREAD flag in /proc/[pid]/stat to detect kernel threads. This fixed an issue when a process's cmdline is empty, htop think it is a kernel thread.
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* linux: drop dead process field column DIRTYChristian Göttsche2021-09-021-1/+0
| | | | | The field for dirty pages in /proc/[pid]/statm is always 0 since Linux 2.6 (see man:proc(5)).
* IWYU updateChristian Göttsche2021-08-251-0/+1
|
* Add columns for process autogroup identifier and nice valueNathan Scott2021-08-091-0/+9
| | | | | | | | | | | | Adds AGRP (autogroup) and ANI (autogroup nice) columns that report the information from /proc/PID/autogroup, as well as handlers for '{' and '}' to change the autogroup nice value. This is guarded by /proc/sys/kernel/sched_autogroup_enabled such that sampling and/or changing values wont be attempted unless the kernel feature is enabled. Fixes: #720
* Move CWD field handling to platform-neutral codeBenny Baumann2021-05-251-2/+0
|
* Move Process_makeCommandStr to global Process implementationBenny Baumann2021-05-231-4/+0
|
* Move kernel/userland thread handling to platform-independent implementationBenny Baumann2021-05-231-6/+0
|
* Pre-calculate isUserlandThread flagBenny Baumann2021-05-231-3/+2
|
* Move mergeCommand to global process structBenny Baumann2021-05-231-32/+0
|
* Move procCmdlineBasenameOffset as cmdlineBasenameStart to global Process ↵Benny Baumann2021-05-231-1/+0
| | | | structure
* Remove duplicate field LinuxProcess->procCmdlineBasenameEndBenny Baumann2021-05-231-1/+0
| | | | This field held practically the same value as cmdlineBasenameEnd
* Move procExeBasenameOffset to main Process structureBenny Baumann2021-05-231-2/+0
| | | | This drops procExeLen, as that field is implicit by strlen(Process->procExe)
* Move procExeDeleted flag to main Process structureBenny Baumann2021-05-231-1/+0
|
* Move procComm and procExe to main Process structureBenny Baumann2021-05-231-2/+0
|
* Refactor makeCommandStrBenny Baumann2021-05-231-17/+23
|
* platform-dependent files included relative to main source directorymayurdahibhate2021-05-101-1/+1
|
* Linux: update IO fieldsChristian Göttsche2021-04-261-7/+11
| | | | | | | | | | | | | | - fix header width of IO_READ_RATE - save data in bytes (not kilobytes) to better compute rate - fix rate data: multiply with 1000 to compensate time difference in milliseconds - rename unit less variable now into realtimeMs - use Process_printBytes(..., data * pageSize, ...) instead of Process_printKBytes(..., data * pageSizeKB, ...) to avoid wrapper
* Rework TTY columnChristian Göttsche2021-04-141-1/+0
| | | | | | | | | | * Rename internal identifier from TTY_NR to just TTY * Unify column header on platforms * Use devname(3) on BSD derivate to show the actual terminal, simplifies current FreeBSD implementation. * Use 'unsigned long int' as id type, to fit dev_t on Linux. Only on Solaris the terminal path is not yet resolved.
* Fix a couple of small spelling mistakes in commentsNathan Scott2021-02-151-1/+1
|
* Linux: overhaul io process fieldsChristian Göttsche2021-01-301-2/+18
| | | | | | | | - avoid UBSAN conversions - print N/A on no data (i.e. as unprivileged user) - fix rate calculation to show bytes (instead of a thousandth) - print bytes as human number (i.e. 8MB) instead of 8388608 - stabilize sorting by adjusting NAN values to very tiny negative number
* Only initialize and gather delay accounting data if a related column is enabledChristian Göttsche2021-01-011-10/+11
| | | | | Avoid creating and communicating over a netlink socket by default, which triggers cap_net_admin checks as root.
* Merge Process_pidColumns into Process_fields and rework auto-fit for ↵Christian Göttsche2020-12-191-3/+1
| | | | PID-like columns
* Rework enum ProcessFieldChristian Göttsche2020-12-191-49/+1
| | | | | | Use only one enum instead of a global and a platform specific one. Drop Platform_numberOfFields global variable. Set known size of Process_fields array
* LinuxProcess: drop dead Process columnsChristian Göttsche2020-12-191-20/+0
|
* Use common naming for bare enum typesChristian Göttsche2020-12-161-2/+2
|
* Cleanup initialization of jiffies on the Linux platformNathan Scott2020-12-141-2/+0
| | | | | | | | | | 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
* Cull the definitions of pageSize and pageSizeKB from CRT.cNathan Scott2020-12-101-0/+4
| | | | | | | | | | | | | | | 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-2/+1
|
* Add Linux cwd process columnChristian Göttsche2020-12-031-1/+4
|
* Only calculate M_LRS size every 5 secondsBenny Baumann2020-11-261-0/+1
|
* Calculate library size (M_LRS column) from maps fileFynn Wulf2020-11-261-8/+9
|
* Drop taskstats conditionalChristian Göttsche2020-11-251-4/+0
| | | | | | | | | | 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-4/+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.
* Include comm before cmdline if exe could not be read, but comm mismatches ↵Benny Baumann2020-11-241-0/+1
| | | | | | basename from cmdline Also highlights entries where exe was marked deleted
* Refactor command string creationBenny Baumann2020-11-241-0/+2
| | | | Hopefully this patch makes it a bit more approachable how it's done.
* Improving Command display/sortNarendran Gopalakrishnan2020-11-241-1/+36
|
* LinuxProcess: mark LinuxProcess_printDelay staticChristian Göttsche2020-11-211-4/+0
|

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