Commit Graph

1073 Commits

Author SHA1 Message Date
Clement Tsang 5bd9e4f6ae
feature: Collapsing in tree mode sums usage to parent (#445)
For the process widget, we now sum the resource usage of the child processes on the parent entry when collapsing in tree mode.

Note that if you search to filter, and collapse, it will not sum the pruned values (values that cannot be seen).  This is partly because I'm a bit lazy, and partly because I think this behaviour makes sense.

For example, let's say I search for a process with 4 child processes "AA, AB, BA, BB", with CPU usage 0.1, 0.2, 0.3, 0.4 respectively.  Assume the parent process has 0 usage.

- Without filter, it sums to 1.0
- With a filter on A, it would sum to just 0.3
- With a filter on AA, it would sum to 0.1

I think this is fine because I'm treating this as summing any child that is still *visible* somehow.  Summing unseen values would probably be weird as it would look like it's not adding up.

Further note that if you had, say, a child "CC" with a usage of, say, 2.0, and its parent of "AB", and you searched for CC in our above example, you would get a sum of 2.2.  This is because AB is still visible by the fact that CC was the searched process, and AB must still exist (albeit faded out) in the tree hierarchy, and as such will still be displayed.
2021-04-05 01:19:17 -04:00
Clement Tsang 405ce64a02
refactor: Switch from fnv to fxhash (#444)
Switches to fxhash from fnv, which should be a bit faster.
2021-04-04 20:48:19 -04:00
Clement Tsang 476aaff45c
change: Make proc widget unit consistent with disk (#443)
In particular, use non-binary prefixes for disk and memory usage in a process. Ideally everything is configurable by the user, but this is fine for now IMO until I can get around to doing in-app config.
2021-04-04 17:03:52 -04:00
Clement Tsang eb6a737d34
feature: Rework network y-axis, linear interpolation for off-screen data (#437)
Rewrite of the y-axis labeling and scaling for the network widget, along with more customization. This still has one step to be optimized (cache results so we don't have to recalculate the legend each time), but will be done in another PR for sake of this one being too large already.

Furthermore, this change adds linear interpolation at the 0 point in the case a data point shoots too far back - this seems to have lead to ugly gaps to the left of graphs in some cases, because the left hand limit was not big enough for the data point. We address this by grabbing values just outside the time range and linearly interpolating at the leftmost limit. This affects all graph widgets (CPU, mem, network).

This can be optimized, and will hopefully be prior to release in a separate change.
2021-04-04 05:38:57 -04:00
allcontributors[bot] 40f4c796f8
docs: add vlakreeh as a contributor (#442)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-23 19:37:38 -04:00
Zeb Piasecki c79956843e
bug: Fix getpwuid segfault (#440)
Fixes a rare segfault if a uid does not have a passwd entry. The unsafe block at https://github.com/ClementTsang/bottom/blob/master/src/app/data_harvester/processes.rs#L137 can return a null pointer as specified at https://www.gnu.org/software/libc/manual/html_node/Lookup-User.html.
2021-03-23 19:37:28 -04:00
allcontributors[bot] b8fb78a769
docs: add pvanheus as a contributor (#441)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-23 19:36:33 -04:00
Clement Tsang de28d24272
github: Update questions template 2021-03-23 16:53:25 -04:00
Clement Tsang 32e3de58f9
docs: Mention the nightly version in the README 2021-03-19 16:39:01 -04:00
Clement Tsang 4d46e7159b
ci: Add cache back again (#435)
* ci: Add cache back again

* comments
2021-03-12 21:41:48 -05:00
pvanheus d8f8a92b55
feature: Add support for displaying load average (#392) 2021-03-12 20:03:25 -05:00
Clement Tsang fd41c1367c
github: modify PR template to specify screenshots 2021-03-12 06:20:31 -05:00
Clement Tsang 637a3949dd
ci: Test macOS ARM and Linux armv6 (#430) 2021-03-04 14:24:21 -05:00
Clement Tsang d5c2ce6607
other: Add fish completions to homebrew template (#427) 2021-03-03 16:12:45 -05:00
Clement Tsang 53d8bdae32
feature: User info in proc widget for Unix-based systems (#425)
Adds users into the process widget (for Unix-based systems).  This shows only in non-grouped modes, similar to state.  Search is also supported.

In addition, a quick fix to prevent users from being in grouped mode when they tried to enter tree mode while grouped.
2021-02-28 17:40:55 -05:00
ClementTsang c406d95699 ci: Lock cargo deb version to 1.29.0 2021-02-24 20:42:47 -05:00
Clement Tsang fe74328647
bug: Fix bugs with disk widget and disk encryption (#423)
Two issues were highlighted as a result of using either Void Linux with disk encryption, or just disk encryption on Linux in general:

Two fixes:
1. Fixes a failed `usage()` call in the `get_disk_usage` function from failing the entire result.  Now it only returns an entry with N/A results.  This occurred in some distros and disk encryption setups, for example, the one for Void Linux here: https://docs.voidlinux.org/installation/guides/fde.html.

2. Fixes a potential mapping issue with disk encryption on Linux in general.  Since the disk might map to `/dev/mapper/whatever`, but the I/O harvester was using another name, the mappings would not match.  As such, we now also check if a symlink exists; if it does, then we take it and work out the correct path.  This also fixes the disk name being wrong.
2021-02-24 20:23:35 -05:00
Clement Tsang 25a0a7b1d0
ci: Fix typo 2021-02-21 14:21:13 -05:00
Clement Tsang ade40a5af8
ci: Add sleep to nightly build script after delete 2021-02-21 14:19:53 -05:00
Clement Tsang 3c76b17c27
change: Alter Nord's border colour (#422)
Updates the border colour on the Nord colour scheme to look less jarring.
2021-02-20 18:37:42 -05:00
Clement Tsang cb1191ff35
deps: Update various deps as per 2021-02-19 (#420)
Major update is tui-rs from 0.13 to 0.14.  This change allows us to update our tables to make them look nicer!
2021-02-19 17:57:39 -05:00
Clement Tsang f2975c3a7c
change: Don't jump to top when using sort shortcuts (#418)
For consistency, we now don't automatically jump to the top of the list when using a sort shortcut. This behaviour already occurred with the sort menu and sorting by mouse clicks, so this is just now more consistent (and IMO less annoying, you can also always jump to the top via gg).
2021-02-19 01:22:19 -05:00
Clement Tsang e6c9187928
bug: Fix sorting menu and sort shortcuts not syncing in gui (#417)
Fixes sorting menus and shortcuts not syncing correctly if the sorting window is open.
2021-02-19 01:02:21 -05:00
Clement Tsang e6230ef156
bug: fix inconsistent spacing with grouped vs non-grouped in the process widget (#416)
Fixes grouped mode having different spacing than non-grouped mode.
2021-02-18 19:15:07 -05:00
Clement Tsang 4db39da75e
feature: Add mouse support to sorting columns (#413)
Adds mouse support for sorting columns within the process widget. You can now click on the column header to sort (or invert the sort).
2021-02-18 17:10:51 -05:00
Clement Tsang ce9818d935
ci: Fix nightly build config again... (#412) 2021-02-18 02:18:54 -05:00
Clement Tsang 67f5531019
ci: Fixes an incorrect action in the nightly build workflow (#411) 2021-02-18 01:32:44 -05:00
Clement Tsang 4555a113b6
ci: Fix incorrect nightly CI name 2021-02-18 01:18:53 -05:00
Clement Tsang f68ea7bce9
ci: Create nightly build CI (#410) 2021-02-18 01:18:04 -05:00
Clement Tsang cf14abe37d
feature: Add ctrl-w and ctrl-h support in the search (#409)
Ctrl-w deletes one word backwards from the current cursor location. Ctrl-h is just an alias for backspace.
2021-02-16 18:07:41 -05:00
Clement Tsang e437b14922
feature: Allow toggling advanced kill menu (#408)
Allows toggling the advanced kill menu via --advanced_kill or advanced_kill=true.
2021-02-15 22:23:22 -05:00
Clement Tsang fb7b1226fd
feature: add nord and nord-light colours (#406)
Adds colour schemes for Nord, along with a light variant.
2021-02-15 14:12:43 -05:00
Clement Tsang f2e6b9232d
deps: Update beef as per RUSTSEC-2020-0122 (#402) 2021-02-03 15:07:13 -05:00
ClementTsang c94e1e821b docs: Reorder some of the changelog items 2021-01-31 14:19:26 -05:00
ClementTsang 233ce96473 github: Change text for release deployment script 2021-01-31 14:19:07 -05:00
ClementTsang f8ff0360e9 docs: remove other errant typo in README 2021-01-30 20:29:07 -05:00
ClementTsang 425f4877de docs: Update changelog, revert formatting typo in README 2021-01-30 20:26:38 -05:00
Clement Tsang 58e18da0c3
uptick: 0.5.7 (#399) 2021-01-30 20:23:18 -05:00
Clement Tsang d48e6cd7e0
bug: Workaround for strange rendering when there are <4 CPU entries reported (#398)
So it seems that tui-rs doesn't like rendering my CPU bars if the height is exactly 1. It needs at least 2. I have no idea why, this is probably something weird with how I render.

This, of course, breaks when there is only one row to report (i.e. with a dual core setup in #397).

The workaround switches the gap between the CPU and mem/net parts to 0, and increases the CPU's draw height by 1, only when the height is otherwise 1 (so the draw height is now at least 2). This does have the side effect of including an extra line to the side borders, but I think it's fine.
2021-01-25 02:21:33 -05:00
allcontributors[bot] 9822478454
docs: add Frederick888 as a contributor (#396)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-01-21 20:54:05 -05:00
Frederick Zhang b8d3b68e75
feature: Use `ps` as fallback to query CPU usage under macOS (#390)
When running without elevated permissions under macOS, sysinfo cannot
query states of processes by root user, which results in 0.0% CPU usage
for all this kind of processes (and state = Unknown).

Here we use `ps`, which has SUID, as a fallback to query CPU usages.
This can be potentially applied to other properties if needed in the
future (we'll need a proper struct and parser).
2021-01-21 20:53:55 -05:00
allcontributors[bot] 3dd748c2f4
docs: add ehamberg as a contributor (#393)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-01-20 01:55:29 -05:00
Erlend Hamberg 5e28f0c538
feature: Show Celcius/Fahrenheit with degree symbol (#391) 2021-01-20 01:55:18 -05:00
Clement Tsang e30518bf62
bug: Fix missing sorting arrow when for non-% mem (#389)
Fixes a bug where you could make the sorting arrow disappear in the mem column if you did:

1. Go to proc widget
2. Switch to memory values from %
3. Press `m`
2021-01-12 21:41:59 -05:00
Clement Tsang c57ce0b45a
docs: Add more details for WSL/WSL2 known issues 2021-01-10 15:44:39 -05:00
Clement Tsang fd29cb0b45
docs: Mention WSL may have some issues for now. 2021-01-10 14:29:46 -05:00
ClementTsang f7244d2927 docs: Update changelog with #386 2021-01-05 22:21:27 -05:00
Clement Tsang cfddb7e223
bug: Fix hide table gap option not working in battery widget (#386)
Fixes the `hide_table_gap` option not working with the battery widget.
2021-01-05 22:18:56 -05:00
ClementTsang 429978d1aa docs: Update support list 2021-01-02 16:33:52 -05:00
Clement Tsang 90be9730a6
feature: Add network interface filtering (#381)
Adds a new option in the config file to filter out network interfaces.  Also add the option to filter by whole words.

Interface follows that of the existing ones:

```toml
[net_filter]
is_list_ignored = false
list = ["virbr0.*"]
regex = true
case_sensitive = false
whole_word = false
```
2021-01-01 18:09:28 -05:00