Monitoring traffic-policy shaper

hi every one

I want to monitoring traffic-policy by shaper name.

example I have “traffic-policy shaper UPLOAD”

how to monitoring traffic by shapert name UPLOAD?

no monitoring by interface, but by traffic-policy shaper name

thanks.

At this time there doesn’t appear to be a way to do that without using linux tc commands directly. I created my own UPLOAD policy shaping my IPFS traffic to 1 Mbps as a test.

 qos {
     interface eth1.200 {
         egress UPLOAD
     }
     policy {
         shaper UPLOAD {
             class 20 {
                 bandwidth 1mbit
                 match IPFS {
                     ip {
                         destination {
                             port 4001
                         }
                     }
                 }
                 queue-type fq-codel
             }
             default {
                 bandwidth 1250mbit
                 queue-type fair-queue
             }
         }
     }
 }

Even with the tc command it doesn’t exactly give you the name of the policy, only its flowid that lands up in the mangle table. Speaking of which I was not able to find any references to the flowids in nftables so not sure where things are hiding.

Anyway I think your best bet for monitoring will be to configure sflow/telegraf and have that sent off to your choice of a time series db (influx) then have grafana plot out some visuals.

tc -j -s qdisc show dev eth1.200 would dump queue stats in json.