Check applied QoS


/ Published in: Bash
Save to your folder(s)

These commands are specific to Buffalo builds of DD-WRT


Copy this code and paste it in your HTML
  1. #Analyse all connections
  2. 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
  3.  
  4. #Filter for specific QoS type
  5. 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
  6.  
  7. #Filter for specific QoS and show mark value
  8. 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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.