Crates.io | psfu |
lib.rs | psfu |
version | 0.4.7 |
source | src |
created_at | 2020-02-05 11:03:13.317747 |
updated_at | 2024-08-02 12:42:54.421718 |
description | process fu |
homepage | https://github.com/idiv-biodiversity/psfu |
repository | https://github.com/idiv-biodiversity/psfu |
max_upload_size | |
id | 205122 |
size | 88,701 |
Process Fu. Do stuff with processes.
psfu
currently has one major command called tree
which is used to show
or
modify
all processes in that process tree.
Show plain process tree for current shell session:
$ psfu tree show plain --arguments $$
3772 -bash
└── 109966 psfu tree show plain --arguments 3772
Other show commands are:
gdb
, may require admin
privileges)Modify commands are:
Commands can be abbreviated to save on typing, as long as they are unambiguous:
# these are the same
psfu tree show affinity
psfu t s a
Use piped input to show forest or to modify multiple process trees:
$ pgrep 'tmux: server' | psfu t s a
1459 tmux: server [0, 1, 2, 3]
├── 1460 bash [0, 1, 2, 3]
│ └── 3764 emacs [0, 1, 2, 3]
│ ├── 108151 aspell [0, 1, 2, 3]
│ └── 111340 rust-analyzer [0, 1, 2, 3]
│ └── 111370 rust-analyzer [0, 1, 2, 3]
└── 3772 bash [0, 1, 2, 3]
└── 114364 psfu [0, 1, 2, 3]
$ pgrep emacs | psfu t m a 0
$ pgrep 'tmux: server' | psfu t s a
1459 tmux: server [0, 1, 2, 3]
├── 1460 bash [0, 1, 2, 3]
│ └── 3764 emacs [0]
│ ├── 108151 aspell [0]
│ └── 111340 rust-analyzer [0]
│ └── 111370 rust-analyzer [0]
└── 3772 bash [0, 1, 2, 3]
└── 114399 psfu [0, 1, 2, 3]
cargo install psfu
git clone https://github.com/idiv-biodiversity/psfu.git
cd psfu
cargo build --release
install -Dm755 target/release/psfu ~/bin/psfu