31

ytop: a TUI system monitor written in Rust

 4 years ago
source link: https://github.com/cjbassi/ytop
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

ytop

Another TUI based system monitor, this time in Rust!

umaQFzz.gifmayABvZ.png!web

Missing features

  • macOS is missing temperatures, disk io counters, and process commandline
  • Process filtering isn't implemented
  • Mouse usage isn't implemented
  • rate and interfaces cli args aren't implemented

Installation

Currently working on Linux and macOS with support planned for all major platforms.

Prebuilt binaries

Prebuilt binaries are provided in the releases tab.

Arch Linux

Install ytop , ytop-bin , or ytop-git from the AUR.

Homebrew

brew tap cjbassi/ytop
brew install ytop

From source

cargo install -f --git https://github.com/cjbassi/ytop

Usage

Keybinds

  • Quit: q or <C-c>
  • Pause: <Space>
  • Process navigation:
    • k and <Up> : up
    • j and <Down> : down
    • <C-u> : half page up
    • <C-d> : half page down
    • <C-b> : full page up
    • <C-f> : full page down
    • gg and <Home> : jump to top
    • G and <End> : jump to bottom
  • Process actions:
    <Tab>
    dd
    
  • Process sorting:
    • p: PID/Count
    • n: Command
    • c: CPU
    • m: Mem
  • Process filtering:
    • / : start editing filter
    • (while editing):
      • <Enter> : accept filter
      • <C-c> and <Escape> : clear filter
  • CPU and Mem graph scaling:
    h
    l
    
  • ? : toggles keybind help menu

Mouse

  • click to select process
  • mouse wheel to scroll through processes

Colorschemes

ytop ships with a few colorschemes which can be set with the -c flag followed by the name of one. You can find all the colorschemes in the colorschemes folder .

To make a custom colorscheme, copy one of the default ones to ~/.config/ytop/<new-name>.json and load it with ytop -c <new-name> . Colorscheme PRs are welcome!

CLI Options

USAGE:
    ytop [FLAGS] [OPTIONS]

FLAGS:
    -a, --average-cpu    Show average CPU in the CPU widget.
    -b, --battery        Show Battery widget (overridden by 'minimal' flag).
    -f, --fahrenheit     Show temperatures in fahrenheit.
    -h, --help           Prints help information
    -m, --minimal        Only show the CPU, Mem, and Process widgets.
    -p, --per-cpu        Show each CPU in the CPU widget.
    -s, --statusbar      Show a statusbar with the time.
    -V, --version        Prints version information

OPTIONS:
    -c, --colorscheme <colorscheme>    Set a colorscheme. [default: default]
    -i, --interfaces <interfaces>      Comma separated list of network interfaces to show. Prepend an interface with '!'
                                       to hide it. 'all' shows all interfaces. [default: !tun0]
    -r, --rate <rate>                  Number of times per second to update the CPU and Mem widgets. [default: 1]

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK