summaryrefslogtreecommitdiffstats
path: root/solaris/SolarisProcessList.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename ProcessList to ProcessTable throughoutNathan Scott2023-08-311-267/+0
| | | | | | | | | | | | Following up with some discusson from a few months back, where it was proposed that ProcessTable is a better name. This data structure is definitely not a list ... if it was one-dimensional it'd be a set, but in practice it has much more in common with a two-dimensional table. The Process table is a familiar operating system concept for many people too so it resonates a little in that way as well.
* Introduce Row and Table classes for screens beyond top-processesNathan Scott2023-08-301-15/+16
| | | | | | | | | 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.
* Adapt platform code for the new Machine base classNathan Scott2023-05-081-320/+12
| | | | | Move host-centric data to new derived <Platform>Machine classes, separate from process-list-centric data.
* Introduce Machine class for host-specific info (split from ProcessList)Nathan Scott2023-05-081-25/+39
| | | | | | | | | | | 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.
* Refactor and consolidate dynamic meters/columns pointersNathan Scott2023-04-061-2/+2
| | | | | | | | This removes the duplication of dynamic meter/column hashtable pointers that has come in between the Settings and ProcessList structures - only one copy of these is needed. With the future planned dynamic screens feature adding another pointer, let us first clean this up before any further duplication happens.
* Fix process time scaling error on SolarisWHR2022-05-261-2/+2
|
* Auto-size (normalized) CPU usage columnsBenny Baumann2022-03-061-0/+5
|
* Introduce screen tabsHisham Muhammad2021-12-071-1/+1
| | | | This is a forward port (by nathans) of Hisham's original code.
* Tidy up process state handlingmarcluque2021-11-021-3/+16
|
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* Merge branch 'dynamic-columns' of https://github.com/smalinux/htop into ↵Nathan Scott2021-08-131-2/+2
|\ | | | | | | smalinux-dynamic-columns
| * PCP: support for 'dynamic columns' added at runtimeSohaib Mohamed2021-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements support for arbitrary Performance Co-Pilot metrics with per-process instance domains to form new htop columns. The column-to-metric mappings are setup using configuration files which will be documented via man pages as part of a follow-up commit. We provide an initial set of column configurations so as to provide new capabilities to pcp-htop: including configs for containers, open fd counts, scheduler run queue time, tcp/udp bytes/calls sent/recv, delay acct, virtual machine guests, detailed virtual memory, swap. Note there is a change to the configuration file path resolution algorithm introduced for 'dynamic meters'. First, look in any custom PCP_HTOP_DIR location. Then iterate, in priority order, users home directory, then local sysadmins files in /etc/pcp/htop, then readonly configuration files below /usr/share/pcp/htop. This final location becomes the preferred place for our own shipped meter and column files. The Settings file (htoprc) writing code is updated to not using the numeric identifier for dynamic columns. The same strategy used for dynamic meters is used here where we write Dynamic(name) so the name can be setup once more at start. Regular (static) columns writing to htoprc - i.e. numerically indexed - is unchanged.
* | Solaris: the average CPU utilization value must never be marked 'offline'Christian Göttsche2021-08-101-1/+2
| | | | | | | | Similar to #729 only for Solaris
* | Fix misc typosChristian Göttsche2021-08-081-1/+1
|/ | | | [ci skip]
* Solaris: support offline CPUs and hot-swappingChristian Göttsche2021-07-181-39/+74
| | | | | Example hot-swapping: psradm -F -f 2
* Add ProcessList_isCPUonlineChristian Göttsche2021-07-181-0/+9
|
* Rework CPU countingChristian Göttsche2021-07-181-5/+9
| | | | | | | | | | | Currently htop does not support offline CPUs and hot-swapping, e.g. via echo 0 > /sys/devices/system/cpu/cpu2/online Split the current single cpuCount variable into activeCPUs and existingCPUs. Supersedes: #650 Related: #580
* Align descriptive commentsBenny Baumann2021-07-151-2/+2
|
* Add a new DynamicMeter class for runtime Meter extensionNathan Scott2021-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on exploratory work by Sohaib Mohamed. The end goal is two-fold - to support addition of Meters we build via configuration files for both the PCP platform and for scripts ( https://github.com/htop-dev/htop/issues/526 ) Here, we focus on generic code and the PCP support. A new class DynamicMeter is introduced - it uses the special case 'param' field handling that previously was used only by the CPUMeter, such that every runtime-configured Meter is given a unique identifier. Unlike with the CPUMeter this is used internally only. When reading/writing to htoprc instead of CPU(N) - where N is an integer param (CPU number) - we use the string name for each meter. For example, if we have a configuration for a DynamicMeter for some Redis metrics, we might read and write "Dynamic(redis)". This identifier is subsequently matched (back) up to the configuration file so we're able to re-create arbitrary user configurations. The PCP platform configuration file format is fairly simple. We expand configs from several directories, including the users homedir alongside htoprc (below htop/meters/) and also /etc/pcp/htop/meters. The format will be described via a new pcp-htop(5) man page, but its basically ini-style and each Meter has one or more metric expressions associated, as well as specifications for labels, color and so on via a dot separated notation for individual metrics within the Meter. A few initial sample configuration files are provided below ./pcp/meters that give the general idea. The PCP "derived" metric specification - see pmRegisterDerived(3) - is used as the syntax for specifying metrics in PCP DynamicMeters.
* Reduce visibility of GZONE and UZONEBenny Baumann2021-07-041-0/+3
| | | | Fixes #624
* Remove unused define on SolarisBenny Baumann2021-07-041-2/+0
|
* Solaris: Always update usernameBenny Baumann2021-06-221-2/+5
|
* Solaris: Implement CWD columnBenny Baumann2021-05-251-0/+18
|
* Solaris: add EXE and COMM columns and use merged command line helpersChristian Göttsche2021-05-231-4/+16
|
* Call makeCommandStr on all platformsBenny Baumann2021-05-231-0/+3
|
* Move kernel/userland thread handling to platform-independent implementationBenny Baumann2021-05-231-9/+11
|
* Rename cmdlineBasenameOffset to cmdlineBasenameEnd to properly indicate the ↵Benny Baumann2021-05-231-1/+1
| | | | fields purpose
* Rename basenameOffset to cmdlineBasenameOffsetBenny Baumann2021-05-231-1/+1
|
* Rename command line field from comm to cmdlineBenny Baumann2021-05-231-1/+1
|
* Solaris: improve process columnsChristian Göttsche2021-05-201-0/+12
| | | | | | | | - fill tty name - fill session id - show real tgid not adjusted - drop unimplemented TPGID, MINFLT and MAJFLT - adjust header width of ZONEID, which get auto-adjusted as a pid-column
* Solaris: reduce function scopesChristian Göttsche2021-05-201-2/+2
|
* Solaris: silence signed comparisonChristian Göttsche2021-05-201-1/+1
|
* Solaris: fix includesChristian Göttsche2021-05-201-1/+1
|
* Solaris: add kstat lookup wrappersChristian Göttsche2021-05-201-22/+22
| | | | | | | The system interfaces kstat_lookup() and kstat_data_lookup() take a non-constant string parameter, but passing string literals is valid. Add wrapper functions to ignore all the const-discard warnings.
* platform-dependent files included relative to main source directorymayurdahibhate2021-05-101-3/+4
|
* cleaned up includes with iwyumayurdahibhate2021-05-101-0/+1
|
* Use unsigned types for CPU counts and associated variablesChristian Göttsche2021-03-191-2/+2
|
* Process: drop commLenChristian Göttsche2021-01-111-1/+0
| | | | | | | | It is only used on Linux to optimize memory handling in case the command changes to a smaller-or-equal string. This "optimization" however causes more code bloat and maintenance cost on string handling issues than it gains.
* Drop usage of formatted error messages from <err.h>Christian Göttsche2021-01-071-1/+0
| | | | | | | They do not clean up the ncurses environment, leaving the terminal in a broken state. Also drop bare usage of exit(3).
* add support to display CPU frequencies on Solarish platformsDominik Hassler2020-12-251-13/+25
|
* Cull the definitions of pageSize and pageSizeKB from CRT.cNathan Scott2020-12-101-15/+22
| | | | | | | | | | | | | | | 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.
* Reduce scope of totaltimeBenny Baumann2020-11-221-5/+6
|
* Rename virtual memory column from M_SIZE to M_VIRTChristian Göttsche2020-11-211-1/+1
| | | | Closes: #325
* Embracing branchesBenny Baumann2020-11-021-8/+19
|
* Spacing around operatorsBenny Baumann2020-11-021-28/+34
|
* Whitespace and indentation issuesBenny Baumann2020-11-021-20/+34
|
* Spacing after keywords (if)Benny Baumann2020-11-021-1/+1
|
* Unify function argument namesChristian Göttsche2020-10-281-6/+6
| | | | | Name first argument of ProcessList_goThroughEntries consistently super Name first argument of ProcessList_new consistently userTable
* Hold only a const version of Settings in ProcessChristian Göttsche2020-10-261-1/+1
|
* Drop tabs in source indentionsChristian Göttsche2020-10-201-2/+2
|

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