Migration This is my new public git source viewer. Source available. Please contact with concerns/bugs. Contact me

users/ryan/modules/simple-bar/simple-bar-source/lib/scripts/netstats.sh

3efaf3cf620ad9ef3e376c26c39c2d843f72da0d · 169 B · 5 lines raw

1 #!/bin/bash
2
3 # Optimized: Single netstat call with direct output processing
4 netstat -w1 2>&1 | awk 'NR==3 {printf "{ \"download\": %s, \"upload\": %s}", $4, $6; exit}'
5