安装工具
sudo apt-get install apache-jmeter vsftpd sysbench iperf lftp # 安装所需工具
sudo systemctl restart vsftpd # 确保FTP服务运行
基础功能测试
ftp或lftp命令行工具测试连接和文件传输:ftp <服务器IP> # 测试基本连接
lftp -e 'mirror /local/path /remote/path; quit' -u <用户名>,<密码> ftp://<服务器IP> # 测试批量传输
性能指标测试
iperf测试服务器带宽和延迟:# 服务端启动iperf
iperf -s
# 客户端测试带宽
iperf -c <服务器IP> -t 30 -i 5
fio测试文件读写速度:fio --ioengine=libaio --rw=randread --bs=4k --numjobs=4 --runtime=60 --filename=/tmp/testfile --name=randread-test
监控与分析
top、htop、iostat等命令实时监控服务器资源使用情况。vsftpd.conf中的并发连接数)。