Skip to content
Snippets Groups Projects

Fix space bug finding interfaces

Merged Denis Roy requested to merge master-patch-6a3d into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -153,9 +153,9 @@ get_nginx_topip_per_site() {
# Poll one-second interface stats from /proc/net/dev
get_onesecond_interface_data() {
ONE_SEC_IF_DATA_START=$(cat /proc/net/dev | egrep "\s+?[a-zA-Z0-9][^lo]+: [0123456789\s]+" | sort)
ONE_SEC_IF_DATA_START=$(cat /proc/net/dev | egrep "\s+?[a-zA-Z0-9][^lo]+:\s+[0123456789\s]+" | sort)
sleep 1s
ONE_SEC_IF_DATA_END=$(cat /proc/net/dev | egrep "\s+?[a-zA-Z0-9][^lo]+: [0123456789\s]+" | sort)
ONE_SEC_IF_DATA_END=$(cat /proc/net/dev | egrep "\s+?[a-zA-Z0-9][^lo]+:\s+[0123456789\s]+" | sort)
}
# Calculate interface throughput, given one interface
Loading