在 Linux 上“测 FTP Server 速度”通常分两种场景:
下面按常用方法和工具说明。
lftp 测下载/上传速度lftp 自带进度和速度显示,很适合测速。
安装
yum install lftp # CentOS/RHEL
apt install lftp # Debian/Ubuntu
测下载速度
lftp ftp://user:password@ftp.server.com -e "get bigfile.iso; bye"
观察输出中的 x MB/s
测上传速度
lftp ftp://user:password@ftp.server.com -e "put bigfile.iso; bye"
指定多线程(更接近真实带宽)
lftp ftp://user:pass@host -e "mirror --parallel=10 --use-pget=10 /remote /local; bye"
curl -u user:password ftp://ftp.server.com/bigfile.iso -o /dev/null
curl -u user:password -T bigfile.iso ftp://ftp.server.com/
可加 -w 看详细时间:
curl -u user:pass ftp://host/file -o /dev/null -w "%{speed_download}\n"
ftp ftp.server.com
> user username
> password
> bin
> get bigfile.iso
但 ftp 命令不显示速度,不推荐用于测速。
如果你怀疑是 FTP 服务本身慢:
dd if=/dev/zero of=testfile bs=1M count=1000
lftp ftp://user:pass@127.0.0.1 -e "put testfile; bye"
如果本机都很慢 → 磁盘 or FTP 配置问题
如果本机快、远程慢 → 网络问题
# 服务端
iperf3 -s
# 客户端
iperf3 -c ftp.server.com
scp bigfile user@ftp.server.com:/tmp/
anon_max_rate)✅ 最快判断方案
lftp ftp://user:pass@host -e "put 1Gfile; bye"
lftp ftp://user:pass@host -e "get 1Gfile; bye"
✅ 确认是否网络问题
iperf3 -c ftp.server.com
如果你愿意,可以告诉我:
我可以给你更精确的命令和参数。