mirror of
https://github.com/uutils/procps.git
synced 2026-06-10 16:14:00 -07:00
e039c3e451edb5871e5b340ab86ac3748ce122dc
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>
procps
Rust reimplementation of the procps project
Provides command line and full screen utilities for browsing procfs, a "pseudo" file system dynamically generated by the kernel to provide information about the status of entries in its process table (such as whether the process is running, stopped, or a "zombie").
Ongoing:
pwdx: Shows the current working directory of a process.free: Shows the amount of free and used memory in the system.w: Shows who is logged on and what they are doing.watch: Executes a program periodically, showing output fullscreen.pmap: Displays the memory map of a process.slabtop: Displays detailed kernel slab cache information in real time.pgrep: Searches for processes based on name and other attributes.pidof: Find the process ID of a running program.
TODO:
ps: Displays information about active processes.pidwait: Waits for a specific process to terminate.skill: Sends a signal to processes based on criteria like user, terminal, etc.tload: Prints a graphical representation of system load average to the terminal.top: Displays real-time information about system processes.vmstat: Reports information about processes, memory, paging, block IO, traps, and CPU activity.pkill: Kills processes based on name and other attributes.snice: Changes the scheduling priority of a running process.
Elsewhere:
killis already implemented in https://github.com/uutils/coreutilsuptime: Shows how long the system has been running, including load average. is already implemented in https://github.com/uutils/coreutils
Installation
Ensure you have Rust installed on your system. You can install Rust through rustup.
Clone the repository and build the project using Cargo:
git clone https://github.com/uutils/procps.git
cd procps
cargo build --release
cargo run --release
License
procps is licensed under the MIT License - see the LICENSE file for details
Languages
Rust
99.7%
Shell
0.3%