22 个版本
| 0.10.0 | 2023 年 12 月 22 日 | 
|---|---|
| 0.9.2 | 2023 年 11 月 11 日 | 
| 0.8.2 | 2022 年 3 月 1 日 | 
| 0.8.1 | 2021 年 12 月 1 日 | 
| 0.2.1 | 2021 年 1 月 27 日 | 
#847 在 网络编程
每月 88 次下载
140KB
337 行
Sysit
系统 Sit,快速查看系统信息!
关于
50 字以内系统资源概览。依赖于 sysinfo 获取所有相关系统信息。

安装
如果你使用 Arch,可以通过 Aur 安装:https://aur.archlinux.org/packages/sysit-bin/
在其他平台上,可以使用安装脚本,它将安装一个 预构建的二进制文件。要安装到 /usr/local/bin/
curl -s https://raw.githubusercontent.com/crodjer/sysit/main/scripts/install.sh | sudo bash
或者,要安装到你选择的任何位置,比如 ~/.local/bin
curl -s https://raw.githubusercontent.com/crodjer/sysit/main/scripts/install.sh | bash -s ~/.local/bin
如果你的平台不受支持,你始终可以使用 cargo
cargo install sysit
原因
能够快速查看基本系统信息而无需切换上下文可能很有用。 sysit 很容易集成到各种状态栏中,例如 tmux、i3/sway 等。
理解输出
 内存使用
 CPU 信息(使用情况和可选频率)
 最热传感器的温度
 网络ping
使用方法
从控制台
只需输入 sysit 即可快速查看系统信息。
sysit on  main is 📦 v0.6.0 via 🦀 v1.56.1
at 18:43:42 ❯ sysit
 21%   5%    45°C    12.0 ms
这也可以与桌面管理器的小程序一起使用。例如,Xfce 的 genmon。
持续监控
监视模式
类似于 watch sysit。可以在 tmux 状态行中进行连续监控。例如
set -g status-right '#[fg=black,bg=blue] #(sysit -wi 2) '
使用 sysit -wi 2 的监视模式有一个优点,即维护一个单独的进程。仅使用普通的 sysit 命令也将工作,但那将意味着每次 tmux 都会启动一个新的进程。
日志模式
有时记录系统统计信息可能很有用,例如在基准测试时。
sysit on  main is 📦 v0.6.0 via 🦀 v1.56.1
at 18:45:26 ❯ sysit -lf
 21%   5%   @2.9 GHz   44°C    9.91 ms
 21%   2%   @2.1 GHz   44°C    8.43 ms
 21%   3%   @2.2 GHz   46°C    14.4 ms
 21%   1%   @3.8 GHz   46°C    139 ms
 24%   63%  @4.1 GHz   55°C    17.9 ms
 25%   10%  @4.0 GHz   48°C    354 ms
 26%   10%  @4.1 GHz   45°C    472 ms
帮助
sysit
Get system resources overview in 50 characters
For usage details, try --help
Understanding the output:
   Memory Usage
   CPU Information (usage and optionally frequency)
   Temperature for the hottest sensor
   Network Ping
USAGE:
    sysit [OPTIONS]
OPTIONS:
    -c, --colors
            force output to be always colorized
    -f, --frequency
            show CPU frequency
    -h, --help
            Print help information
    -i, --interval <INTERVAL>
            update interval in seconds for watch/log mode
            [default: 1]
    -l, --log
            run in log mode (will continuously append a row to standard output)
        --no-colors
            force output to be never colorized
        --ping-host <PING_HOST>
            host to use for testing the ping
            [default: 1.0.0.1]
        --threshold-cpu-high <THRESHOLD_CPU_HIGH>
            the threshold for high cpu usage (higher values will be rendered in red)
            [default: 80.0]
        --threshold-cpu-medium <THRESHOLD_CPU_MEDIUM>
            the threshold for medium cpu usage (higher values will be rendered in yellow)
            [default: 50.0]
        --threshold-memory-high <THRESHOLD_MEMORY_HIGH>
            the threshold for high memory usage (higher values will be rendered in red)
            [default: 80.0]
        --threshold-memory-medium <THRESHOLD_MEMORY_MEDIUM>
            the threshold for medium memory usage (higher values will be rendered in yellow)
            [default: 50.0]
        --threshold-temp-hot <THRESHOLD_TEMP_HOT>
            the threshold for high temperature (higher values will be rendered in red)
            [default: 75.0]
        --threshold-temp-warm <THRESHOLD_TEMP_WARM>
            the threshold for warm temperature (higher values will be rendered in yellow)
            [default: 55.0]
    -V, --version
            Print version information
    -w, --watch
            run in watch mode (as if running with the watch command)
依赖项
~2–12MB
~104K SLoC