Based on my experiences on Ubuntu

Software Package Management

  • set up proxy for apt
sudo bash -c 'cat << EOF > /etc/apt/apt.conf.d/proxy.conf
Acquire {
  HTTP::proxy "http://127.0.0.1:8118";
  HTTPS::proxy "http://127.0.0.1:8118";
}
EOF'

System Monitoring

Basic Info

# memory
free -m 

# get process id
ps aux | grep <pattern>

# view startup command of process
ps flww -p [PID]

# check cpu usage
top -p <pid>

# list by threads
top -H -p <pid>

# disk
df -h

# networks
iostat

Performance Testing

Network Bindwidth Testing

There are two common means to achive this

  • using iperf (recommended)
# server
iperf -s

# client
iperf -c 127.0.0.1

  • using netcat
# server
nc -lp 7777 > /dev/null

# client
pv -r /dev/zero | nc 127.0.0.1 7777

Network

Configuration

  • set up ip and route for network interface temporarily
ifconfig eth0 192.168.0.100 netmask 255.255.255.0

route add default gw 192.168.0.1

# check 
ip route

Drivers

# 查看usb设备
lsusb 

# 查看驱动加载日志
dmesg 

insmod mt76x2u.ko

depmod

modprobe mt76x2u

# remove module
rmmod mt76x2u 

Reference