当我使用shebang#!/usr/bin/env python运行脚本时,系统如何知道python使用哪个?如果我python在环境变量中寻找 bin 路径,我什么也找不到。
env | grep -i python
Run Code Online (Sandbox Code Playgroud) 我有一个 4 端口网桥:
root@Linux-Switch:~# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000024cd2cb0 no eth0
eth1
eth2
eth3
Run Code Online (Sandbox Code Playgroud)
我的目标是限制eth2接口的上传速度。(eth0 是上行交换机的上行接口)。我一直在尝试通过 tc 和 iptables 来做到这一点。
# tried in both the filter table and mangle table
iptables -A FORWARD -t mangle -m physdev --physdev-in eth2 -j MARK --set-mark 5
tc qdisc add dev eth0 root handle 1:0 htb default 2
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 1mbit ceil 1mbit
tc class add dev eth0 parent …Run Code Online (Sandbox Code Playgroud)