summaryrefslogtreecommitdiffstats
path: root/solaris/SolarisProcess.c
Commit message (Collapse)AuthorAgeFilesLines
* Auto-size (normalized) CPU usage columnsBenny Baumann2022-03-061-2/+2
|
* Dynamically scale the ST_UID size to support 32-bit UIDsSilke Hofstra2021-10-271-2/+2
| | | | | | | | | | | | | | | | | | While most Unix-like systems use 16-bit user IDs, Linux supports 32-bit UIDs since version 2.6. UIDs above 65535 are used for UID namespacing of containers, where a container has its own set of 16-bit user IDs. Processes in such containers will have (much) larger UIDs than 65535. Because the current format strings for `ST_UID` and `USER` are `%5d` and `%9d` respectively, processes with such UIDs lead to misaligned columns. Dynamically scale the `ST_UID` column and increase the size of `USER` to 10 characters (length of UINT32_MAX) to ensure that the user ID always fits. Additionally: clean up how the titlebuffer size calculation and ensure the PID column has a minimum size of 5.
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* Solaris: Implement CWD columnBenny Baumann2021-05-251-0/+1
|
* Add ELAPSED process columnChristian Göttsche2021-05-231-0/+1
| | | | | | | | | Add process columns showing the elapsed time since the process was started. Similar to STARTTIME, but shows the time passed since the process start instead of the fixed start time of the process. Closes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782636
* Solaris: add EXE and COMM columns and use merged command line helpersChristian Göttsche2021-05-231-1/+3
|
* Move kernel/userland thread handling to platform-independent implementationBenny Baumann2021-05-231-12/+0
|
* Solaris: improve process columnsChristian Göttsche2021-05-201-4/+5
| | | | | | | | - 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
* Rework TTY columnChristian Göttsche2021-04-141-1/+1
| | | | | | | | | | * 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.
* Include signal.h, reorder headersBenny Baumann2021-04-031-5/+7
|
* Sort out the mess around column sorting that had accumulated over timeDaniel Lange2021-01-211-8/+8
|
* Linux: use correct column alignment for wide fieldsChristian Göttsche2021-01-111-1/+1
| | | | | | | This affects: - PROC_COMM, PROC_EXE and CWD on Linux - JAIL on FreeBSD and DragonFlyBSD - ZONE on Solaris
* Solaris: make Process callbacks staticChristian Göttsche2021-01-091-13/+13
| | | | Fixes prototype of SolarisProcess_compareByKey since 90ea3ac3
* Object: return int on comparisonChristian Göttsche2021-01-021-1/+1
| | | | | Comparisons do, due to the new introduced shaceship-comparisons, only return -1, 0, 1 or the result of strcmp().
* fix argument type following prototype change in "Invert Process_compare ↵Dominik Hassler2020-12-231-1/+1
| | | | resolution so that superclass matches run first"
* Merge Process_pidColumns into Process_fields and rework auto-fit for ↵Christian Göttsche2020-12-191-37/+21
| | | | PID-like columns
* Rework enum ProcessFieldChristian Göttsche2020-12-191-4/+3
| | | | | | 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
* Split boilerplate and platform-independent field comparisonBenny Baumann2020-12-191-1/+1
| | | | | | | | This acheives two things: - Allows for simple tie-breaking if values compare equal (needed to make sorting the tree-view stable) - Allows for platform-dependent overriding of the sort-order for specific fields Also fixes a small oversight on DragonFlyBSD when default-sorting.
* Invert Process_compare resolution so that superclass matches run firstHisham Muhammad2020-12-191-14/+7
| | | | | | | | | | * This removes duplicated code that adjusts the sort direction from every OS-specific folder. * Most fields in a regular htop screen are OS-independent, so trying Process_compare first and only falling back to the OS-specific compareByKey function if it's an OS-specific field makes sense. * This will allow us to override the sortKey in a global way without having to edit each OS-specific file.
* Split RichString_(append|appendn|write) into wide and asciiChristian Göttsche2020-12-081-1/+1
| | | | | | | | RichString_writeFrom takes a top spot during performance analysis due to the calls to mbstowcs() and iswprint(). Most of the time we know in advance that we are only going to print regular ASCII characters.
* Rename virtual memory column from M_SIZE to M_VIRTChristian Göttsche2020-11-211-1/+1
| | | | Closes: #325
* Add process column for normalized CPU usageChristian Göttsche2020-11-161-0/+1
| | | | Shows the process CPU usage divided by the number of CPU cores
* Introduce spaceship comparison for ProcessesChristian Göttsche2020-11-151-8/+10
| | | | | | | | | | | | | | | If currently two unsigned values are compared via `a - b`, in the case b is actually bigger than a, the result will not be an negative number (as -1 is expected) but a huge positive number as the subtraction is an unsigned subtraction. Avoid over-/underflow affected operations; use comparisons. Modern compilers will generate sane code, like: xor eax, eax cmp rdi, rsi seta al sbb eax, 0 ret
* Hold only a const version of Settings in ProcessChristian Göttsche2020-10-261-2/+2
|
* Mark process parameter of Process_writeField consistently constChristian Göttsche2020-10-261-3/+3
|
* Mark remaining classes constChristian Göttsche2020-10-131-1/+1
|
* Mark process argument of Process_isThread constChristian Göttsche2020-10-091-2/+2
|
* Enable -Wcast-qual compiler warningChristian Göttsche2020-10-061-6/+6
|
* Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
|
* Drop dead code after breakChristian Göttsche2020-09-241-8/+1
|
* Axe automated header generation.Zev Weiss2020-09-031-44/+0
| | | | | | | | | | | | | | 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.
* Widen ST_UID (UID) column to 5 chars to allow UIDs > 9999 without breaking ↵Daniel Lange2018-10-071-1/+1
| | | | | | alignment Issue Github #841, Debian bug #910492
* Solaris: update proc state letters to reflect Solaris usageGuy M. Broome2018-04-051-1/+1
|
* Solaris: fix a memory leak caused by calling ProcessList_getProcess twice ↵Guy M. Broome2018-04-051-3/+3
| | | | for each LWP
* Solaris: showing a dash for the top-level process is no longer necessaryGuy M. Broome2018-04-051-7/+1
|
* Solaris: get completely out of the file handling business using libprocGuy M. Broome2018-04-051-0/+2
|
* Solaris: Implement LWP enumeration (#768)gmbroome2018-03-271-4/+29
| | | | | | | | | | | | | | | Squashed the following commits: * Solaris: Get LWP enumeration working * Solaris: Make showing and hiding of kernel threads behave * Solaris: remove usage of lwpstatus that is no longer needed * Solaris: no discrete access to parent proc structure needed * Solaris: Restore runtime MaxPid detection after LWP changes * Solaris: Workaround virtual PID signal issue by shadowing kill() with a macro * Solaris: Fix unintention double-shifting of virtual PID for LWP enumeration * Solaris: Add LWPID to default display since LWP enumeration is also default * Solaris: use PAGE_SIZE_KB from Process.h instead of custom definition * Solaris: stop LWP enumeration at 1023 LWPs per proc since that is all we can handle in the virtual PID
* Solaris: enough changes made to justify a copyright bump to 2018Guy M. Broome2018-03-161-1/+1
|
* Solaris: fix malloc() / free() issues with zone name handlingGuy M. Broome2018-03-161-3/+3
|
* Import Solaris support (#741)gmbroome2018-03-021-0/+193
This commit adds support for Solaris, squashed from PR #741: Summary of additions: * Initial setup of Solaris platform directory * Add Solaris platform into autoconf template * Uptime and load averages * Add dependency on libkstat * Basic process listing * Zone name display * CPU detection * Per-process memory and CPU usage parsed correctly * Uses sysconf to discover number of CPUs, instead of more complex libkstat code * Simple memory display working * Reduce repetitive calls to the PAGE_SIZE macro when reading memory info * Add Project, Contract, Task, and Pool into process properties * Use system major()/minor() implementations and remove extraneous definition of mkdev() * Get the STARTTIME column working properly, using the Linux implementation as a guide

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