Return to Snippet

Revision: 59781
at September 30, 2012 13:50 by avggeek


Initial Code
#Analyse all connections
awk '{ gsub(/(src|dst|sport|dport|mark)=/, ""); printf "%s %-21s %-21s %s\n", $1, $1 == "tcp" ? $5 ":" $7 : $4 ":" $6, $1 == "tcp" ? $6 ":" $8 : $5 ":" $7, $(NF-1) == 0 ? "Default/Standard" : $(NF-1) == 10 ? "Premium" : $(NF-1) == 20 ? "Express" : $(NF-1) == 30 ? "Standard" : $(NF-1) == 40 ? "Bulk" : "Exempt" }' /proc/net/ip_conntrack

#Filter for specific QoS type
awk '{ gsub(/(src|dst|sport|dport|mark)=/, ""); printf "%s %-21s %-21s %s\n", $1, $1 == "tcp" ? $5 ":" $7 : $4 ":" $6, $1 == "tcp" ? $6 ":" $8 : $5 ":" $7, $(NF-1) == 0 ? "Default/Standard" : $(NF-1) == 10 ? "Premium" : $(NF-1) == 20 ? "Express" : $(NF-1) == 30 ? "Standard" : $(NF-1) == 40 ? "Bulk" : "Exempt" }' /proc/net/ip_conntrack | grep -i Express

#Filter for specific QoS and show mark value
awk '{ gsub(/(src|dst|sport|dport)=/, ""); printf "%s %-21s %-21s\n",$1 == "tcp" ? $6 ":" $8 : $5 ":" $7,$(NF-1),$(NF-1) == "mark=0" ? "Default" : $(NF-1) == "mark=10" ? "Premium" : $(NF-1) == "mark=20" ? "Express" : $(NF-1) == "mark=30" ? "Standard" : $(NF-1) == "mark=40" ? "Bulk" : "Exempt"}' /proc/net/ip_conntrack | grep -i Express

Initial URL


Initial Description
These commands are specific to Buffalo builds of DD-WRT

Initial Title
Check applied QoS

Initial Tags


Initial Language
Bash