Bandwidth control script for some ips
#!/bin/bash
BANDWIDTH_KBIT=7000
BANDWIDTH_INTERFACE=eth0
FINAL_IPs_WITH_BANDWIDTH_CONTROL=(7 8 50 111)
LAN_IP=$( ip addr show $BANDWIDTH_INTERFACE | grep -Eo '([0-9]{1,3}\.){3}' | sed -n 1p )
# clear all tc rules
tc qdisc del dev $BANDWIDTH_INTERFACE root
# create tc rules
tc qdisc add dev $BANDWIDTH_INTERFACE root handle 1: htb
for i in ${FINAL_IPs_WITH_BANDWIDTH_CONTROL[*]}; do
tc class add dev $BANDWIDTH_INTERFACE classid 1:${i} htb rate ${BANDWIDTH_KBIT}kbit
tc filter add dev $BANDWIDTH_INTERFACE parent 1: protocol ip prio 1 u32 match ip dst $LAN_IP${i} flowid 1:${i}
done
to list only machines that have traffic
tc -s -d class show dev eth0 | awk '$1 == "Sent" && $2 { print "\n"x; print } { x=$0 }'
to list only machines that have traffic order by traffic usage
tc -s -d class show dev eth0 | awk 'BEGIN{ ORS=" " } $1 == "Sent" && $2 { print "\n"x; print } { x=$0 }' | cut -d' ' -f1,3,9,10,29,30 | sort -k6n
Updatable objects appear as 'no longer supported'
Symptoms In some scenarios, the following validation warning appears on an updatable object: " Object is no longer supported. Enforci...
Mais vistos
-
Java Keytool Command These commands allow you to generate a new Java Keytool keystore file, create a CSR, and import certificates. A...
-
Kaspersky seems to be storing windows update files on the C Drive: Here -> C:\ProgramData\KasperskyLab\adminkit\1093\.working Change fo...
-
This particular error is generally experienced when people attempt a non NTFS volume such as ReFS to a DFSR replication group as documented...