mirror of
https://github.com/churchers/vm-bhyve.git
synced 2025-12-11 09:20:17 +01:00
Get correct stats for virtual interface in 'vm info'. more work would be required to support ip6
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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##* }")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user