From 39a198bc91d7fb27bc6f7af495624d7f05643927 Mon Sep 17 00:00:00 2001 From: Yuri Benditovich Date: Sat, 20 Jan 2024 16:55:52 +0200 Subject: [PATCH] netkvm: update netkvm-wmi.cmd script Signed-off-by: Yuri Benditovich --- NetKVM/DebugTools/WMI/netkvm-wmi.cmd | 53 +++++++++++++++++++++------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/NetKVM/DebugTools/WMI/netkvm-wmi.cmd b/NetKVM/DebugTools/WMI/netkvm-wmi.cmd index 381b6c083..852248004 100644 --- a/NetKVM/DebugTools/WMI/netkvm-wmi.cmd +++ b/NetKVM/DebugTools/WMI/netkvm-wmi.cmd @@ -2,49 +2,76 @@ @echo off if "%1"=="" goto help if /i "%1"=="debug" goto debug +if /i "%1"=="cfg" goto cfg if /i "%1"=="stat" goto stat if /i "%1"=="reset" goto reset if /i "%1"=="rss" goto rss_set -if /i "%1"=="qfo" goto failover_query -if /i "%1"=="efo" goto failover_end +if /i "%1"=="tx" goto tx +if /i "%1"=="rx" goto rx + goto help :debug call :dowmic netkvm_logging set level=%2 goto :eof +:cfg +call :dowmic netkvm_config get /value +goto :eof + :stat -call :dowmic netkvm_statistics get /value +echo ---- TX statistics --- +call :diag tx +echo ---- RX statistics --- +call :diag rx +echo ---- RSS statistics -- +call :diag rss +goto :eof + +:tx +call :diag tx +goto :eof + +:rx +call :diag rx goto :eof :reset -call :dowmic netkvm_statistics set rxChecksumOK=0 +set resettype=7 +if "%2"=="rx" set resettype=1 +if "%2"=="tx" set resettype=2 +if "%2"=="rss" set resettype=4 +echo resetting type %resettype%... +call :dowmic netkvm_diagreset set type=%resettype% goto :eof :rss -call :dowmic NetKvm_RssDiagnostics get /value +call :diag rss goto :eof :rss_set if "%2"=="" goto rss -call :dowmic NetKvm_RssDiagnostics set DeviceSupport=%2 +call :dowmic NetKvm_DeviceRss set value=%2 goto :eof -:failover_query -call :dowmic NetKvm_Standby get /value +:diag +call :dowmic netkvm_diag get %1 /value goto :eof :dowmic -wmic /namespace:\\root\wmi path %* +::echo executing %* +wmic /namespace:\\root\wmi path %* | findstr /v __ | findstr /v /r ^^^$ goto :eof :help echo Example of WMI controls to NetKvm echo %~nx0 command parameter echo debug level Controls debug level (use level 0..5) -echo stat Retrieves internal statistics -echo reset Resets internal statistics -echo rss Query RSS statistics +echo cfg Retrieves current configuration +echo stat Retrieves all internal statistics +echo tx Retrieves internal statistics for transmit +echo rx Retrieves internal statistics for receive +echo rss Retrieves internal statistics for RSS echo rss 0/1 Disable/enable RSS device support -echo qfo Query failover setting +echo reset [tx^|rs^|rss] Resets internal statistics(default=all) goto :eof