Get correct stats for virtual interface in 'vm info'. more work would be required to support ip6

This commit is contained in:
Matt Churchyard
2020-02-05 16:02:22 +00:00
parent 30eea9f3c1
commit 6a6d3cb40f
2 changed files with 2 additions and 3 deletions

View File

@@ -25,7 +25,7 @@
# POSSIBILITY OF SUCH DAMAGE.
VERSION=1.5-devel
VERSION_INT=105009
VERSION_INT=105010
VERSION_BSD=$(uname -K)
PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin

View File

@@ -185,7 +185,6 @@ info::guest_show(){
# basic guest configuration
info::__output_config "loader" "" "none"
info::__output_config "uuid" "" "auto"
info::__output_config "uefi" "" "default"
info::__output_config "cpu"
# check for a cpu topology
@@ -379,7 +378,7 @@ info::guest_networking(){
echo "${_INDENT}bridge: ${_bridge:--}"
if [ -n "${_id}" ]; then
_stats=$(netstat -biI "${_id}" | tail -n1 | awk '{ for (i=NF; i>1; i--) printf("%s ",$i); print $1; }' | awk '{print $2,$5}')
_stats=$(netstat -biI "${_id}" |grep '<Link#' |tail -n1 |awk '{ for (i=NF; i>1; i--) printf("%s ",$i); print $1; }' |awk '{print $2,$5}')
_b_in=$(info::__bytes_human "${_stats%% *}")
_b_out=$(info::__bytes_human "${_stats##* }")