Lag sum by consumer.
./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --describe --group csa_aggregator | tail -n +3 | awk '{ sum[$7] += $3 } END { for(i in sum) print i, sum[i] }'
Speed by consumer , the 10 number is '10 second' of sampling. the result is in message by secondes.
paste <(./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --describe --group csa_aggregator | tail -n +3 | awk '{ sum[$7] += $3 } END { for(i in sum) print i, sum[i] }' ) \
<(sleep 10 && ./kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --describe --group csa_aggregator | tail -n +3 | awk '{ sum[$7] += $3 } END { for(i in sum) print i, sum[i] }') | \
awk '{ sum[$1] += ($4 - $2) /10 } END { for(i in sum) print i, sum[i] }'