1 Star 0 Fork 0

XCLHove/network-speed

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

网速显示(仅限Linux)

network-speed

介绍

在Linux系统通过悬浮窗显示实时网速的小工具。

仅在Ubuntu22.04上测试通过。

使用

  1. 需要安装ifstatopenjdk才能使用。
    sudo apt install ifstat openjdk-8-jdk -y
    
  2. 如何不能正常使用,请尝试运行下面的核心命令以检查输出是否正常。
  3. 运行network-speed.sh脚本即可启动程序。

功能

  1. 双击悬浮窗关闭程序。
  2. 右键悬浮窗打开设置。

核心命令

  1. 获取网速

    ifstat -q -i eth0 1 1
    

    输出样例:

    user@ubuntu:~$  ifstat -q -i eth0 1 1
           eth0       
     KB/s in  KB/s out
         0.00      0.00
    
  2. 列出网络

    ip addr show | grep -E '^[0-9]+: ' | awk -F': ' '{print $2}'
    

    输出样例:

    user@ubuntu:~$ ip addr show | grep -E '^[0-9]+: ' | awk -F': ' '{print $2}'
    eth0
    lo
    enp8s0f1
    wlp0s20f3
    docker0
    veth54db585@if6
    vetha61af39@if8
    veth1439fae@if10
    
MIT License Copyright (c) 2024 XCLHove Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

在Linux系统通过悬浮窗显示实时网速的小工具,基于 Java AWT 和 ifstat 实现。 展开 收起
Java
MIT
取消

发行版 (1)

全部

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xclhove/network-speed.git
git@gitee.com:xclhove/network-speed.git
xclhove
network-speed
network-speed
master

搜索帮助