Posts for: #Linux

debian-tips

最小化安装完debian 12后给vim安装插件,发现vim编译没有支持python3 于是网上搜了一圈发现都在说要自己编译vim 我 xxoo? 其实安装vim-nox 这个包就能支持了 sudo apt install vim-nox This package contains a version of vim compiled with support for scripting with Lua, Perl, Python 3, Ruby, and Tcl but no GUI.
Read more

iperf3测速

iperf3 服务端 iperf3 --server iperf3 客户端 perf3 -c 10.179.0.1 -t 60 -b 1M 常用参数 Server or Client: -p, --port # server port to listen on/connect to Server specific: -s, --server run in server mode -D, --daemon run the server as a daemon -I, --pidfile file write PID file -1, --one-off handle one client connection then exit Client specific: -c, --client <host> run in client mode, connecting to <host> -u, --udp use UDP rather than TCP -b, --bandwidth #[KMG][/#] target bandwidth in bits/sec (0 for unlimited) (default 1 Mbit/sec for UDP, unlimited for TCP) (optional slash and packet count for burst mode) -t, --time # time in seconds to transmit for (default 10 secs) 结果
Read more

linux丢包排查

网卡 查看网卡接口基本信息 netstat {-i | --interface} | column -t Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg docker0 1500 0 0 0 0 0 0 0 0 BMU ens33 1500 316789 0 0 0 105365 0 0 0 BMRU ens37 1500 631 0 0 0 44 0 0 0 BMRU lo 65536 3725115 0 0 0 3725115 0 0 0 LRU 网卡 ring buffer ethtool {-g|--show-ring} ens33 Ring parameters for ens33: Pre-set maximums: RX: 4096 RX Mini: 0 RX Jumbo: 0 TX: 4096 Current hardware settings: RX: 256 RX Mini: 0 RX Jumbo: 0 TX: 256 其它查看网卡信息的命令
Read more

Linux 命令提升效率

进入新创建的目录 mkdir new_dir cd $_ vim打开文件忘记sudo,导致保存不了 !:执行外部命令 tee:read from standard input and write to - standard output and files %:vim寄存器,保存当前编辑文件路径 :w !sudo tee %
Read more