Commit Graph
1121 Commits
Author SHA1 Message Date
Clement Tsang 861791698e feature: initial Intel GPU support to get process usage (#2239)
This adds very basic GPU support for getting process usage for Intel GPUs on Linux. Note this PR does not handle memory/VRAM usage for now. The implementation is basically a clone of the AMD GPU one.
2026-09-07 00:11:05 -04:00
Clement Tsang fe79718e17 refactor: move GPU collection files around (#2231)
No functionality change, this just rearranges the file structure a bit.
2026-09-04 02:00:38 -04:00
Clement Tsang f9e1703727 Improve linux nvidia gpu caching (#2230)
Changes it from a 10s full cache to a 60s conditional cache; we still check the power state now even when using the cached list.
2026-09-03 03:18:51 -04:00
Clement Tsang 30fb02c187 refactor: move Linux DRM-related collection code into its own file (#2228)
Doing this as refactoring work before I start working on supporting Intel GPUs, which are expected to share the same collection code. This should have no functional change.
2026-09-02 02:48:18 -04:00
Clement Tsang e4ba8c657b refactor: run nightly format (#2229)
Run nightly format as of 2026-08-31.
2026-09-01 10:02:00 +00:00
Clement Tsang 175c12edc4 bug: don't check sleeping NVIDIA GPU/devices to avoid waking them on Linux (#2225)
This PR makes it so that we should hopefully avoid waking up NVIDIA GPUs while gathering info (on Linux only). It mostly follows how we were doing it for AMD devices, which required a bit of refactoring to get it to work with the NVML library I was using.

Note that, as mentioned above, it does not change behaviour for Windows (or other OSes that work with NVIDIA GPUs) at the moment, as I need to use some fairly OS-specific logic to get it to work on each platform from the looks of it.

Unfortunately, I no longer have any Nvidia-based machines to test with, let alone laptops with Optimus... so this may be hard to verify whether it works on my end.
2026-08-31 07:09:41 +00:00
fazzi 4be359f9ff bug: handle Linux cmdline that don't have null byte separators (#2210) 2026-08-25 03:09:06 -04:00
Anis e7ec56333b docs: fix typo in the '--help' flag (#2207) 2026-08-24 01:06:17 -04:00
Clement Tsang 0b22ee4c43 feature: add option to show zeroed total network usage on startup (#2199)
This adds the ability to run with `--network_start_zeroed` or the `start_zeroed` config option, which will zero out the total network usage so that bottom starts with it at zero, rather than the total network usage reported by the OS since boot.
2026-08-17 00:12:21 -04:00
Clement Tsang a10eadd2d5 bug: fix cgroups v1 swap collection around sentinel max value (#2195)
Problem was that with cgroups v1, if the swap had an unlimited value set, it would be done by just setting a huge integer, which would break things.
2026-08-13 05:22:40 -04:00
Clement Tsang 726f787b89 bug: fix close logic when pressing enter in sort menu (#2191)
There was an if-condition that only ran if the sort state was false. But this would never be hit since `use_sort_table_value` always set it to false beforehand, so it would be stuck focusing on a hidden menu.
2026-08-13 00:40:41 +00:00
Clement Tsang 836ec5bf7f deps: don't directly use time for logging (#2182)
Wanted to prune Cargo.toml a tiny bit and noticed I could just use humantime to do this instead of time for logging purposes. Of course I still pull it in via Cargo.lock though.
2026-07-31 09:14:48 +00:00
Clement Tsang 95b60c8016 feature: add configurable default column sort order (#2174)
Adds an optional configuration field for the temp/process/disk table widgets to control the default sort order.
2026-07-26 20:37:20 -04:00
Clement Tsang 547011a5c4 other: remove filedescriptor hack for freebsd (#2167)
A looooong time ago, we had to manually hijack stdio for FreeBSD to suppress a bogus stderr warning (see
#798). I filed an upstream report at GuillaumeGomez/sysinfo#875, but the real issue was actually with FreeBSD itself. From the upstream upstream bug report at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228432, it looks like this has been fixed since 2022 for FreeBSD 13, so I think it's safe to remove this hack at this point on our end, especially given that I don't build binaries for older than FreeBSD 13 anymore (oldest is 15 now).

This PR allows us to entirely remove the filedescriptor crate for FreeBSD since we no longer use it entirely.
2026-07-20 03:29:18 -04:00
Clement Tsang e68dd616de other: remove rfind optimization for linux process stat parsing (#2164)
We're removing this micro-optimization in favour of not potentially breaking against the unstable ABI for process lengths. Sucks but oh well.
2026-07-20 01:03:02 +00:00
Clement Tsang 204c1edf9b bug: fix incorrect bound length for comm parentheses searching (#2163)
I made the assumption that the max length of the comm field is 16 bytes. This is wrong though - it's now 64.

Note we may want to change it in the future to work regardless of potential length.
2026-07-19 23:30:19 +00:00
Clement Tsang b9b1a203c8 bug: fix incorrect header text being used for the process widget (#2162)
This was causing us to not show the correct header (e.g. one with shortcuts) for the process widget.
2026-07-19 22:21:51 +00:00
Clement Tsang 8b2b3327b3 bug: fix first disk I/O value reported at startup being incorrect (#2152)
Because of the way I was initializing things, this caused it to report a huge spike at the start since it was doing a subtraction against 0. This fixes it by just using a hashmap (which also fixed another FIXME) and initializing the prev comparison structure on first view + skipping the first instance.
2026-07-15 08:11:49 +00:00
Clement Tsang d0053421b4 bug: fix missing deserialize options for read/write in process widget (#2150)
Fix us not accepting `read/rps` and `write/wps` as columns. This also adds tests to catch this more easily in the future.
2026-07-15 06:43:14 +00:00
Clement Tsang ddbb8aae99 refactor: use add impl for adding memory values in the neum (#2148) 2026-07-14 00:08:05 -04:00
Clement Tsang 9c79622422 bug: fix draw bug where the pipe chars could draw over the end (#2146)
Technically the end could draw over since I did `start..pipe_end`, where `pipe_end` could be equal to `end`. This just caps it at `end - 1`.
2026-07-13 00:04:31 -04:00
Clement Tsang c696597e81 bug: fix parsing issue certain comm entries to be missing (#2145)
The bug would cause something like `(sd-pam)` to be missing, because what would happen is this:

1. We have something like `"123 ((sd-pam)) blah blah blah"`
2. We parse `start_paren` to be index 5.
3. We parse `end_paren` to be index 13.
4. Our `comm` is `"(sd-pam"`, and the rest of our string is `") blah blah blah"`... which is problematic, as then the rest of the parsing will be incorrect, and the entry gets rejected!
2026-07-12 00:13:49 -04:00
Clement Tsang 69f6ce1553 bug: fix bug with Linux signals 34 or higher being off by 2 (#2144)
Fixes a bug with determining the signal for Linux since there was a logic bug. Oops.
2026-07-11 00:39:10 -04:00
Clement Tsang 892157794a other: fix a potential underflow with ARC memory subtraction (#2143) 2026-07-11 00:01:36 -04:00
Clement Tsang 6d55442c0c bug: actually fix capitalized 'q' not exiting (#2137)
Turns out it needs to be done through the shift branch. Oops. Also updates docs.
2026-07-09 05:06:53 -04:00
Umberto Puddu bebc199a3c bug: accept process column aliases advertised by the config schema (#2131) 2026-07-07 22:34:01 -04:00
Clement Tsang 9fc30ac2ff refactor: small cleanup of some string formatting (#2130)
Some quick random refactors I spotted while looking at something else.
2026-07-07 04:34:08 -04:00
Clement Tsang af18a747e9 other: attempt a fix to reduce CPU cycles spent on kitty for cursor_trail (#2119)
Deals with a possible issue with kitty and its `cursor_trail` functionality, where it supposedly does a bit of extra calculation work when the cursor's location after drawing is too far from the previous location when kitty is checking whether it should recalculate things for the trail, even if the cursor is hidden (at least this is my guess by looking around in https://github.com/kovidgoyal/kitty/blob/c1d507dbe8cd12830d8b97b0d350d9dc2e4d383f/kitty/cursor_trail.c). The fix is (apparently) to just park the cursor at the origin after drawing each time, and this seemingly helps as a workaround.

If this is right (and it very well could be wrong, I'm making a guess here), IMO the actual fix is that kitty should _probably_ skip cursor trail calculation work if the cursor is hidden I guess?
2026-06-30 21:59:48 +00:00
Clement Tsang 0666032052 other: remove extra show that does nothing (#2117) 2026-06-29 23:05:00 -04:00
Clement Tsang 1a0d99b2b4 other: remove extra hide/show that does nothing (#2116)
Spotted while looking into something else, we call it twice (once right after). These should be safe to remove as such.
2026-06-30 02:27:53 +00:00
Clement Tsang 40254c24e0 other: fix schema crate interfering with installs (#2109)
This change should fix the issue around `cargo install` being confused by the schema generation binary by just moving it entirely into a separate tool "crate".
2026-06-27 17:44:44 -04:00
Clement Tsang b3694fc3f4 other: mention memory/network alias in deprecation warnings (#2102) 2026-06-22 02:25:54 -04:00
Clement Tsang e19480591d deps: bump ratatui to 0.30.2 and ratatui-core to 0.1.2 (#2098) 2026-06-20 22:26:40 +00:00
Gergő Gutyina 378dce78c1 docs: memory.legend_position -> memory_graph.legend_position (#2096) 2026-06-20 15:04:17 -04:00
Clement Tsang 5fde90fc3f bug: fix memory collection using cgroup v1 sentinel max as total (#2093)
Fixes a bug with cgroups v1, where the "total" if there isn't a limit set may be some crazy high number which would be interpreted as many terabytes large. This is obviously incorrect, so we should not use that as the total, and instead, use the min of the actual total and the cgroups value (so if a lower cgroup v1 value is set, we use that instead).
2026-06-20 04:51:54 -04:00
Justin Martin 3542c0bc49 feature: FreeBSD add ufs disk io counters (#2055)
This PR adds ufs disk io counters on freebsd by using sysinfo. This PR also updates the Cargo.toml to use the dep syntax for the unused feature flags starship-battery and nvml-wrapper.
2026-06-20 02:39:47 -04:00
Clement Tsang 382dfdb80c other: bump min version to 1.95.0 (#2052)
Bumps the minimum version set to 1.95.0. This should give us a couple of neat new features to work with.
2026-06-20 06:16:51 +00:00
Clement Tsang ddc169c6d0 feature: add option to track unmounted disks on Linux (#2088)
This PR adds the option to additionally scan unmounted disk partitions. This currently only works on Linux.
2026-06-20 04:19:32 +00:00
Clement Tsang fca070ed08 feature: add disk I/O time series chart (#2073)
This PR adds a disk I/O (read and write rate) graph.
2026-05-30 00:43:20 -04:00
Puneet Dixit 799bf2193b other: treat uppercase Q as quit shortcut (#2074) 2026-05-23 23:12:59 -04:00
Clement Tsang e406ee8347 other: add explicit short-gpu-names option (#2072)
This PR adds the option to opt in to using the short GPU names setting. Also fix a test and some docs.
2026-05-20 06:11:47 +00:00
Gergő Gutyina 6cf578d4c7 feat: use short "GPU" name in memory widget if there's only one (#1791) 2026-05-19 23:43:25 -04:00
Clement Tsang 8cd50b2a4a bug: fix bug causing deprecated setting warnings even if commented out (#2070)
Comment out flags header in default config file + fix bug causing deprecated warnings if `[flags]` was uncommented even when the fields themselves were commented out.
2026-05-20 03:15:44 +00:00
Clement Tsang 6daf7ebd3f bug: fix issue with parsing quoted delimiters in process search (#2069)
Noticed this when trying to parse something with `<` and `>` in the name, even when quoted. The fix is to just check for quotes when delimiting.
2026-05-19 09:44:02 +00:00
Clement Tsang a629056da9 other: support cgroups for CPU usage% calculations (#2066)
This change makes it so we consider cgroup settings (namely, number of allowed CPUs) when considering average CPU usage/process CPU usage.
2026-05-18 07:36:53 +00:00
Clement Tsang a0c96cfd6e other: clean up config file migrations (#2065)
Cleaning up a bunch of config file migration work.
2026-05-16 01:49:33 -04:00
Clement Tsang 65acf5e49e other: move cpu and memory settings over (#2064) 2026-05-15 20:00:44 -04:00
Clement Tsang 899914591e other: migrate over process config fields to [processes] (#2063)
Migrate over process config fields from the general `[flags]` to `[processes]`. Similar to #2062, this only deprecates them at the moment.
2026-05-13 03:14:19 -04:00
Clement Tsang edc295e3ed other: partial migration of network/memory config options from flags (#2062)
This change moves some options to a more appropriate section for the config file. This only deprecates the old options for now, so they're still valid, but we will remove them later (maybe after the next stable release, to give warning).

One thing I want to do for the legend position options is maybe expand it, and now is the best time to do so, but for now I'm just copying it over verbatim.

The deprecated options will also emit a warning to stderr.

This PR also contains a driveby to alias `[network]` to `[network_graph]`.
2026-05-12 04:59:59 -04:00
Clement Tsang 859ec27a05 feature: take cgroups into account for memory usage (#2061)
This PR adds support for taking cgroup usage/total into account when calculating memory and swap usage.
2026-05-10 07:40:18 +00:00