Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux 查看当前网速 #346

Open
Bpazy opened this issue Dec 22, 2024 · 1 comment
Open

Linux 查看当前网速 #346

Bpazy opened this issue Dec 22, 2024 · 1 comment

Comments

@Bpazy
Copy link
Owner

Bpazy commented Dec 22, 2024

iftop

iftop 是一个实时监控网络流量的工具,它可以显示每个接口的数据传输速率。

安装:

$ sudo apt install iftop

使用:

$ sudo iftop

效果:

                 195Kb             391Kb             586Kb             781Kb        977Kb
└────────────────┴─────────────────┴─────────────────┴─────────────────┴─────────────────
10.25.26.121                   => 180.111.118.167                  179Kb  40.0Kb  35.1Kb
                               <=                                  187Kb  41.9Kb  33.5Kb
10.25.26.121                   => 14.103.117.97                   10.1Kb  8.01Kb  6.23Kb
                               <=                                 7.52Kb  5.98Kb  4.65Kb
10.25.26.121                   => 106.75.222.155                  3.16Kb  4.92Kb  6.09Kb
                               <=                                 3.16Kb  4.92Kb  6.09Kb
10.25.26.121                   => 220.170.52.145                   624b   4.10Kb  3.79Kb
                               <=                                  624b   3.65Kb  3.39Kb
10.25.26.121                   => 92.255.85.107                   1.03Kb  3.72Kb  3.44Kb
                               <=                                 1.64Kb  3.03Kb  2.80Kb
10.25.26.121                   => 106.111.52.115                  4.28Kb  5.20Kb  10.3Kb
                               <=                                  208b    208b   6.06Kb
10.25.26.121                   => 10.23.255.1                        0b   1.14Kb  1.38Kb
                               <=                                    0b   2.73Kb  3.51Kb
10.25.26.121                   => 10.23.255.2                        0b    526b    328b
                               <=                                    0b    713b    446b
10.25.26.121                   => public1.114dns.com                 0b    640b    400b
                               <=                                    0b    339b    212b
10.25.26.121                   => 157.240.10.32                    720b    576b    360b
                               <=                                    0b      0b      0b
10.25.26.121                   => ec2-54-161-152-147.compute-1.   1.83Kb   374b    590b
                               <=                                  804b    161b    201b
10.25.26.121                   => 104.194.8.134                    976b    390b    539b
                               <=                                    0b      0b      0b
10.25.26.121                   => 192.168.31.41                      0b    122b    152b
                               <=                                    0b      0b      0b
10.25.26.121                   => 10.42.0.0                          0b    122b    152b
                               <=                                    0b      0b      0b
10.25.26.121                   => 10.42.0.1                          0b    122b    152b
                               <=                                    0b      0b      0b
10.25.26.121                   => 192.168.31.21                      0b    122b     76b
                               <=                                    0b      0b      0b
10.25.26.121                   => 172.19.0.1                         0b    122b     76b
                               <=                                    0b      0b      0b
10.25.26.121                   => 172.21.0.1                         0b    122b     76b
                               <=                                    0b      0b      0b
10.25.26.121                   => 10.42.1.1                          0b    122b     76b
                               <=                                    0b      0b      0b

─────────────────────────────────────────────────────────────────────────────────────────
TX:             cum:    141KB   peak:    202Kb           rates:    202Kb  70.6Kb  70.6Kb
RX:                     122KB            201Kb                     201Kb  63.7Kb  61.0Kb
TOTAL:                  263KB            402Kb                     402Kb   134Kb   132Kb
@Bpazy
Copy link
Owner Author

Bpazy commented Dec 22, 2024

nethogs

nethogs 是一个按进程显示带宽使用情况的工具。

安装:

$ sudo apt install nethogs

使用:

sudo nethogs

效果:

NetHogs version 0.8.7-2build2

    PID USER     PROGRAM                             DEV         SENT      RECEIVED      
      ? root     unknown TCP                                     1.598       7.520 KB/sec
1307928 ubuntu   sshd: ubuntu@pts/1                  eth0        1.234       0.938 KB/sec
  52088 root     /usr/sbin/tailscaled                eth0        0.854       0.624 KB/sec
1211689 root     /usr/local/bin/k3s agent            tailsc      0.416       0.195 KB/sec
2496526 www-da.. nginx: worker process               tailsc      0.000       0.000 KB/sec
1304935 ubuntu   sshd: ubuntu                        tailsc      0.000       0.000 KB/sec
1211716 root     containerd                          eth0        0.014       0.000 KB/sec

  TOTAL                                                          4.116       9.277 KB/sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant