简介
A
ab
accept
ack
ag
alias
apachectl
apk
apropos
apt-get
aptitude
apt-key
apt-sortpkgs
ar
arch
arj
arp
arpd
arping
arptables
arpwatch
as
at
atop
atq
atrm
awk
axel
B
badblocks
base64
basename
batch
bc
bg
bind
blkid
blockdev
bmodinfo
break
builtin
bunzip2
bye
bzcat
bzcmp
bzdiff
bzgrep
bzip2
bzip2recover
bzless
bzmore
C
cal
cancel
cat
cd
cdrecord
chage
chattr
chcon
chfn
chgrp
chkconfig
chmod
chown
chpasswd
chroot
chsh
cksum
clear
clock
clockdiff
cmp
col
colrm
column
comm
command
compress
consoletype
continue
convertquota
cp
cpio
createrepo
crontab
csplit
cu
cupsdisable
cupsenable
curl
cut
D
date
dc
dd
declare
depmod
df
dhclient
dhcpd
dhcrelay
diff
diff3
diffstat
dig
dircolors
dirname
dirs
disown
dmesg
dmidecode
dnf
dnsdomainname
docker
domainname
dos2unix
dpkg-deb
dpkg-divert
dpkg-preconfigure
dpkg-query
dpkg-reconfigure
dpkg-split
dpkg-statoverride
dpkg-trigger
dpkg
dris
dstat
du
dump
E
e2fsck
e2label
echo
ed
edquota
egrep
eject
elinks
elm
emacs
enable
env
ethtool
ex
exec
exit
expand
export
exportfs
expr
F
false
fc
fdisk
fg
fgrep
file
find
findfs
finger
firewall-cmd
fishshell
fmt
fold
fping
free
fsck
ftp
ftpcount
ftpshut
ftptop
ftpwho
fuser
G
gcc
gcov
gdb
get_module
getenforce
getent
getsebool
git
gpasswd
gpm
grep
groupadd
groupdel
groupmems
groupmod
groups
grpck
grpconv
grpunconv
grub
grub2-mkconfig
grub2-set-default
gunzip
gzexe
gzip
H
halt
hcitool
hdparm
head
help
hexdump
history
host
hostid
hostname
hostnamectl
hping3
htdigest
htop
htpasswd
hwclock
I
iconv
id
ifcfg
ifconfig
ifdown
ifstat
iftop
ifup
indent
info
init
inotifywait
insmod
install
iostat
iotop
ip
ip6tables-restore
ip6tables-save
ip6tables
ipcalc
ipcrm
ipcs
iperf
iptables-restore
iptables-save
iptables
iptraf
iptstate
iscsiadm
ispell
J
jed
jobs
joe
join
journalctl
jq
jwhois
K
kernelversion
kexec
kill
killall
L
last
lastb
lastlog
ld
ldconfig
ldd
less
let
lftp
lftpget
lha
lilo
ln
lnstat
local
locate
logger
login
logname
logout
logrotate
logsave
logwatch
look
losetup
lp
lpadmin
lpc
lpq
lpr
lprm
lpstat
ls
lsattr
lsb_release
lsblk
lscpu
lsmod
lsof
lspci
lsusb
ltrace
lvcreate
lvdisplay
lvextend
lvreduce
lvremove
lvresize
lvscan
lynx
M
mail
mailq
mailstat
make
man
mapfile
md5sum
mesg
mii-tool
mkbootdisk
mkcert
mkdir
mke2fs
mkfs
mkinitrd
mkisofs
mknod
mkswap
mktemp
modetest
modprobe
more
mount
mpstat
mtools
mtr
mv
mysql
mysqladmin
mysqldump
mysqlimport
mysqlshow
N
named-checkzone
nano
nc
ncftp
neofetch
nethogs
netstat
newusers
nfsstat
ngrep
nice
nisdomainname
nl
nm
nmap
nmcli
nohup
nologin
nproc
nslookup
ntpdate
ntsysv
O
objdump
od
openssl
P
pacman
parted
partprobe
passwd
paste
patch
pathchk
perl
pfctl
pgrep
php
pico
pidof
pidstat
pigz
ping
ping6
pip
pkexec
pkill
pmap
popd
poweroff
ppp-off
pr
printf
protoize
prtstat
ps
pssh
pstack
pstree
pushd
pv
pvchange
pvck
pvcreate
pvdisplay
pvremove
pvs
pvscan
pwck
pwconv
pwd
pwdx
pwunconv
Q
quota
quotacheck
quotaoff
quotaon
R
rcconf
rcp
read
readelf
readonly
reboot
reject
rename
renice
reposync
repquota
resize
restore
restorecon
return
rev
rexec
rlogin
rm
rmdir
rmmod
route
rpm
rpm2cpio
rpmbuild
rpmdb
rpmquery
rpmsign
rpmverify
rsh
rsync
runlevel
S
sar
scp
screen
script
scriptreplay
sed
seinfo
semanage
sendmail
seq
service
sesearch
set
setfacl
setpci
setsebool
setsid
sftp-server
sftp
sh
sha256sum
shift
shopt
showmount
shuf
shutdown
skill
slabtop
sleep
slocate
smartmontools
smbclient
smbpasswd
sort
source
speedtest-cli
spell
split
squid
squidclient
ss
ssh-add
ssh-agent
ssh-copy-id
ssh-keygen
ssh-keyscan
ssh
sshd
sshpass
startx
stat
strace
strings
stty
su
sudo
sum
supervisord
suspend
swapoff
swapon
sync
sysctl
syslog
systemctl
systool
T
tac
tail
tailf
talk
tar
tcpdump
tcpreplay
tee
telinit
telnet
tempfile
test
tftp
time
timedatectl
times
tload
tmux
top
touch
tput
tr
tracepath
traceroute
trap
tree
true
tty
type
U
ulimit
umask
umount
unalias
uname
unarj
uncompress
unexpand
uniq
unlink
unprotoize
unrar
unset
unzip
updatedb
uptime
useradd
userdel
usermod
usernetctl
users
uucico
uupick
uuto
V
vdfuse
vgchange
vgconvert
vgcreate
vgdisplay
vgextend
vgreduce
vgremove
vgrename
vgscan
vi
vmstat
volname
W
w
wait
wall
watch
wc
wget
whatis
whereis
which
who
whoami
write
X
xargs
xauth
xclip
xhost
xinit
xlsatoms
xlsclients
xlsfonts
xrandr
xset
xz
Y
yes
ypdomainname
yum
Z
zcat
zfore
zip
zipinfo
zipsplit
znew
其他
7z
speedtest-cli - Linux命令大全 - 笔下光年
网站首页
speedtest-cli
命令行下测试服务器外网速度 ## 补充说明 **speedtest-cli** 是一个使用python编写的命令行脚本,通过调用speedtest.net测试上下行的接口来完成速度测试,最后我会测试运维生存时间所在服务器的外网速度。项目地址:https://github.com/sivel/speedtest-cli ### 安装speedtest-cli speedtest-cli需要在python 2.4-3.4的环境下,安装方法都很简单,自己选择以下最适合你的一种。 **pip方式** ```shell # pip install speedtest-cli ``` **easy_install方式** ```shell # easy_install speedtest-cli ``` **github+pip方式** ```shell # pip install git+https://github.com/sivel/speedtest-cli.git ``` 或者 ```shell # git clone https://github.com/sivel/speedtest-cli.git # python speedtest-cli/setup.py install ``` **下载脚本方式** ```shell # wget -O speedtest-cli https://raw.github.com/sivel/spe ... er/speedtest_cli.py # chmod +x speedtest-cli ``` 或者 ```shell # curl -o speedtest-cli https://raw.github.com/sivel/spe ... er/speedtest_cli.py # chmod +x speedtest-cli ``` 直接下载脚本,给予执行权限即可。 ### 用法 ```shell -h, --help show this help message and exit --share 分享你的网速,该命令会在speedtest网站上生成网速测试结果的图片。 --simple Suppress verbose output, only show basic information --list 根据距离显示speedtest.net的测试服务器列表。 --server=SERVER 指定列表中id的服务器来做测试。 --mini=MINI URL of the Speedtest Mini server --source=SOURCE Source ip address to bind to --version Show the version number and exit ``` ### 实例 列出所有在中国的测试服务器: ```shell [root@li229-122 ~]# speedtest-cli --list | grep China 1185) China Unicom (Changchun, China) [10534.35 km] 3784) China Mobile (Urumqi, China) [10581.15 km] 2667) Beijing Normal University (Beijing, China) [11117.03 km] 2529) Beijing Normal University (Beijing, China) [11117.03 km] 2816) Capital Online Data service (Beijing, China) [11117.03 km] 4354) SXmobile (Taiyuan, China) [11383.17 km] 3973) China Telecom (Lanzhou, China) [11615.43 km] 3633) China Telecom (Shanghai, China) [11983.37 km] 3927) China Mobile Jiangsu Co., Ltd. (Suzhou, China) [11989.27 km] 2461) China Unicom (Chengdu, China) [12213.35 km] 1028) Shepherd Software (Xiamen, China) [12785.57 km] 1628) Xiamen Guangdian Xinxu (Xiamen, China) [12785.57 km] 3891) GZinternet (Guangzhou, China) [13005.36 km] 3871) SZWCDMA (Shenzhen, China) [13059.20 km] 3819) SZU (Shenzhen, China) [13059.20 km] 1536) STC (Hong Kong, China) [13088.37 km] 1890) Telin (Hong Kong, China) [13088.37 km] ``` **结果解释** ```shell 3633) China Telecom (Shanghai, China) [11983.37 km] ``` ```shell 3633: 服务器id china telecom:isp,这里是中国电信 shanghai,china :服务器所在地址 11983.37 km:两台服务器地理位置之间距离,我这台机器在美国,和上海相距11983.37公里,很远呐. ``` **外网速度测试** ```shell [root@li229-122 ~]# speedtest-cli --server=3633 --share Retrieving speedtest.net configuration... Retrieving speedtest.net server list... Testing from Linode (173.255.219.122)... Hosted by China Telecom (Shanghai) [11983.37 km]: 23.603 ms Testing download speed........................................ Download: 24.84 Mbit/s Testing upload speed.................................................. Upload: 4.57 Mbit/s Share results: http://www.speedtest.net/result/3240988007.png ```
上一篇:
source
下一篇:
spell