簡體   English   中英

在BASH中如何在活動的互聯網界面上找到我的系統,上傳速度是多少?

[英]In BASH how can i find my system on active internet interface, what is the upload speed?

我正在嘗試編寫一個TUI帶寬跟蹤應用程序,在查詢時可以立即告訴我,我的下載和上傳速度是XXXX。 我已經知道下載我可以使用wget並使用BASH解析它,但我如何獲得上傳速度?

下載解析方法示例:

1) Remote download : wget http://x.x.com:7007/files/software/vnc.zip

Length: 1594344 (1.5M) [application/zip]
Saving to: `vnc.zip'

100%[==================================================================>] 1,594,344    573K/s   in 2.7s    

2012-03-24 11:35:22 (573 KB/s) - `vnc.zip' saved [1594344/1594344]

2) Local download tells

Length: 1594344 (1.5M) [application/zip]
Saving to: `vnc.zip'

100%[==================================================================>] 1,594,344   --.-K/s   in 0.1s    

2012-03-24 06:43:04 (11.4 MB/s) - `vnc.zip' saved [1594344/1594344]

跟進:

Upload server:

$ iperf -s -p 65000
------------------------------------------------------------
Server listening on TCP port 65000
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local x.238 port 65000 connected with x.96 port 37463
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-11.9 sec  2.00 MBytes  1.40 Mbits/sec


Up-loader:

$ iperf -c x.238 -p 65000
------------------------------------------------------------
Client connecting to x.238, TCP port 65000
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local x.96 port 37463 connected with x.238 port 65000
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.4 sec  2.00 MBytes  1.61 Mbits/sec

wput wget的雙胞胎妹妹

這是一個樣本運行!

C:\Users\admin\Desktop\wput-pre0.6>wput C:\wput\pavan.txt ftp://admin:password@example.com
--16:55:00-- `C:/wput\pavan.txt'
    => ftp://padmin:xxxxx@example:21/C:/wput/pavan.txt
Connecting to example.com:21... connected!
Logging in as admin ... Logged in!
Length: 5
100%[===================================] 5
16:55:01 (pavan.txt) - `84.75B/s' [5]

FINISHED --16:55:01--
Transfered 5 bytes in 1 file at  3.73B/s

這個答案可能重復

wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM