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.
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!
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).
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.
Add support for a temperature graph widget. Quick-and-dirty implementation for now, will clean this up with other widgets later (maybe after adding a disk graph widget).
When a process name contains multi-byte characters, cmdline[start..end]
is unsafe since it operates on bytes and can cause panic when start/end
are not char boundaries.
Looks like the issue was related to how we were getting priority in Windows, using the winprocinfo crate. This is resolved by just manually doing the windows API calls necessary.
---
* test if leak is caused by winprocinfo
* manually implement priority code
* cleanup
* update changelog
* basic priority and nice functionality
* fix fmt, clippy and tests
* trying to fix other platform build errors
* fmt fix
* trying more fixes
* clean project
* refactored nice to be for all unix systems
* few more places where I had to change cfg for Nice
* Fix scheme names issues
* fix for schema
* fmt
* fixed clippy errors
* 'nice' fix
* fmt
* fixed cfg in tests also
* trying to fix macos test errors
* fix nice value extraction for mac
* modularised nice and priority for mac and freebsd
* fmt
* more multi target to unix
* removing unnecesary guards
* added safety comments
- also reverted string array reference changes
utils fix
* weird utils clippy error fix
* removed unneeded commit
* not needed after main merge(?)
* add nohash and rustc-hash
* use fxhash by default
* comment
* fmt
* clippy
* use nohash for pid stuff
* fix import
* fix imports again
* fix windows type for gpu pid
* fix potential logic bug with generate points logic, but this isn't the actual issue
* update changelog
* why was that there
* okay let's not bother
* Revert "okay let's not bother"
This reverts commit 1ce8f5619f.
* Revert "why was that there"
This reverts commit 6a2a4da04a.
* Revert "fix potential logic bug with generate points logic, but this isn't the actual issue"
This reverts commit 7f7de8055b.
* Revert "bug/refactor: draw average CPU last, refactor CPU data code (#1804)"
This reverts commit 43e1b34899.
* reverse as a lazy fix for avg
* hide k-threads init
comment
* add config for hide_k_threads
arg help
* update docs for hide_k_threads
* add test_toggle_k_thread for process_table
* update help text and schema
* add hide_k_threads to sample_configs default
* add Virt column to sample default config
* update sample demo config column name for schema ci
* force_rerender_and_update from toggle_k_threads for updates when frozen
* use is_kernel for ProcessType
* remove todo
* Apply suggestions from code review
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
---------
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
* driveby use rustix
* refactor some code aeround
* bug: fix colon at end of process name for now
* clippy
* comments
* changelog
* some other changes + test
* extra test
* feature: add support for threads in linux
* bump version too
* only enable for linux for now
* thread some things around
* update changelog
* add highlighting support
* fmt and run schema
* how did this get added
* hmmm cfg in if seems to not work
* fix updated fields
* fixes
* revert uptime rename
* some cleanup
* fix doc
* oop
* bug: fix parsing issue around certain disk names
Turns out that in /proc/mount disk names may have weird escape
characters - these need to be changed when parsing it.
* update changelog
* back to the slow
* Add test
* deps: bump sysinfo, fix cpu
* fix things for at least Linux
* bump some other stuff
* more things
* windows
* more stuff
* display
* ahhhh it's not stable
* redundant f32
* fix freebsd
* move widgets
* reduce allocations needed
* ah
* more possible optimizations around reducing allocs
* some fixes
* I forgot to clear the buffer oops
* missing
* only run terminal cleanup after certain point