22 Commits

Author SHA1 Message Date
Daniel Hofstetter 295cf62b0f tests.rs: adapt to change in ctor 2026-05-07 10:51:08 +02:00
yushuoqi ee98c0a78f add hugetop command 2026-04-03 15:36:39 +08:00
Bluemangoo a0e61a90c7 skill: add basic implementation 2025-08-07 10:28:32 +08:00
Sylvestre Ledru e9ea7a5dc0 use uutests 2025-04-11 23:59:07 +02:00
Bluemangoo b5f44f3fa1 vmstat: add simple tests 2025-03-28 16:14:09 +00:00
Krysztal Huang 1d83d7a8a3 tload: Basic implementation of tload (#362)
* tload: add basic tui layout of modern look

* tload: set x-axis bound from 0 to the width of terminal

* tload: fix mismatched returning type

* tload: add `#[allow(clippy::cognitive_complexity)]`

* tload: add by-utils test

* tload: tweaks for max height of chart

* tload: bump version of `ratatui` from `0.28` to `0.29`

* tload: fix typo

* tload: set exit code to 130

* tload: fix typo

* tload: add license header for `tui.rs`
2025-03-25 16:58:35 +01:00
Tuomas Tynkkynen 5dfcdb09e4 sysctl: Add tool
This supports basic get and set of sysctls on Linux. Main missing thing
is reading /etc/sysctl.d files.
2025-01-18 15:11:23 +02:00
MCredbear ab6e081faa pkill: implement (#290)
* pkill: init source

* pkill: implement

* pkill: implement `-e`

* pkill: change `&mut self` to `&self` for `status`, `stat`, `start_time`'s args

* pkill: implement `-H`

* pkill: format code

* pkill: remove .idea dir

* pkill: beautify code

* pkill: beautify code

* pkill: fix Cargo.toml

* pkill: remove duplicated process.rs

* pkill: add unit tests

* pkill: beautify code

* pkill: fix CI failures for windows

* pkill: fix CI failures for windows

* pkill: fix CI failures for windows

* pkill: fix CI failures for windows

* pkill: fix CI failures for windows

* pkill: fix CI failures for MacOS

* pkill: fix CI failures for windows

* pkill: fix CI failures for windows

---------

Co-authored-by: Krysztal Huang <krysztal.huang@outlook.com>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-01-15 22:51:53 +08:00
Krysztal Huang e7a893d01a snice: Add basic usage tests 2024-08-27 01:27:13 +08:00
Krysztal Huang 9b9b450e83 top: Implemented basic output. 2024-08-22 17:48:16 +08:00
Krysztal Huang 8faf849b42 pidwait: Add basic test for pidwait 2024-08-07 23:40:39 +08:00
Krysztal Huang e039c3e451 ps: Add command ps (#133)
* ps: Add command `ps`

* pidof: Add some basic arguments and flags

* ps: Introduce new dependencies.

Introduce `uu_pgrep` for processing processes, and introduce `prettytable-rs` for output.

* ps: Finish command infrastructure.

* pgrep: Implemented `Hash` trait for `ProcessInformation`.

* misc: Introduce `nix` crate

* pgrep: Rename `TerminalType` to `Teletype`

* ps: Use `Vec<Rc<RefCell<_>>>` for mutable data.

* misc: Fix conflict

* misc: Fix fmt

* pgrep: Revert refactoring.

* ps: Add `basic_collector`

* ps: Introduce `picker` mod to do data picking.

* ps: Implemented user defined data picking

* ps: Collect and apply header mapping and use `Vec` instead of `LinkedList`

* ps: Add license header

* ps: Apply suggestions

* ps: Implemented logic of `-o`

* ps: Implement basic function.

* ps: Remove empty line of output

* ps: Implemented nullable format parser.

And also introduce `thiserror` crate.

* ps: Implemented `-o` (`--format`)

* ps: Add license header for `parser.rs`

* misc: Apply modifications from upstream

* ps: Implemented code of `time`

* ps: Fix check failure

* ps: Fix build failure on Windows

* ps: Enable tests for another *NIX system.

* ps: Revert tests support for *NIX platform.

It looks like it's very difficult to implement the ps command on *NIX platforms as portable, as it's only portable if you have a proc pseudo-fs. In other words, the current design only even supports Linux.

- FreeBSD's proc pseudo-fs is not automounted.
- macOS does not have a proc fs, it use sysctl instead.

* ps: Refactor mappings to `mapping.rs`

* ps: Clean code

* misc: Bump version of `nix` crate.

* ps: Rewrite document and optimize code.

* ps: Clean TODO and add TODO

Remove TODO in `mapping.rs` and add TODO in `collector.rs`

* ps: Allow multiple occurrences of the same code.

* ps: Fix default codes' display

* ps: Use `Result` instead of `Option` in `parser.rs`

* ps: Remove duplicate elements of `proc_infos`

* ps: Implemented sorting

But only implemented the basic usage: sorting by pid.

* ps: Rename functions in `sorting.rs`

- Rename `sorting` to `sort`
- Rename `default_sort` to `sort_by_pid`

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-08-07 10:04:00 +02:00
Krysztal Huang 40199f249f pidof: Add test file 2024-07-08 16:35:44 +08:00
Krysztal112233 f448003b08 pgrep: Add command pgrep 2024-06-18 15:01:52 +08:00
Krysztal Huang 9391cf1e32 slabtop: Add command (#42) 2024-04-16 11:58:12 +02:00
Sylvestre Ledru f51f905286 adjust the name 2024-02-17 14:54:03 +01:00
Sylvestre Ledru 0b6d16586a pmap: add initial version 2024-02-06 08:52:16 +01:00
Sylvestre Ledru c8debd01cd watch: add initial version 2024-01-31 23:22:46 +01:00
Sylvestre Ledru 4b4fd96b75 w: add initial version 2024-01-31 23:11:42 +01:00
Sylvestre Ledru dc06ab730d implement the first version of free 2024-01-26 22:36:02 +01:00
Sylvestre Ledru d59dadc46c remove artifacts 2024-01-26 20:20:18 +01:00
Sylvestre Ledru 8e9cac5e66 create skeleton & pwdx as poc 2024-01-26 20:18:43 +01:00