Frank Wunderlich <frank-w@xxxxxxxxxxxxxxx> wrote: > Hi, > > i want to read counters defined in nftables, but have not found a solid way to do this > > nft list table ip filter > > shows me the rules from specific table with all chains, rules and counters, e.g. > > chain voip1 { > counter packets 3226 bytes 780864 accept > } > > chain voip2 { > counter packets 1640 bytes 119449 accept > } > > this needs to be parsed with grep/sed/awk, so maybe there is an easier way to read the counters. found nothing in manpage or google, so i just ask here. maybe there is a way to show the last x min traffic. i need this to check if connections is "alive" You could use a named counter and then fetch it via 'nft list counter inet tablenam countername'.