kvm-guest-drivers-windows

Форк
0
76 строк · 1.7 Кб
1
:: Example of accessing NetKvm internals via WMI commands:
2
@echo off
3
if "%1"=="" goto help
4
if /i "%1"=="debug" goto debug
5
if /i "%1"=="cfg" goto cfg
6
if /i "%1"=="stat" goto stat
7
if /i "%1"=="reset" goto reset
8
if /i "%1"=="rss" goto rss_set
9
if /i "%1"=="tx" goto tx
10
if /i "%1"=="rx" goto rx
11

12
goto help
13
:debug
14
call :dowmic netkvm_logging set level=%2
15
goto :eof
16

17
:cfg
18
call :dowmic netkvm_config get /value
19
goto :eof
20

21
:stat
22
echo ---- TX statistics ---
23
call :diag tx
24
echo ---- RX statistics ---
25
call :diag rx
26
echo ---- RSS statistics --
27
call :diag rss
28
goto :eof
29

30
:tx
31
call :diag tx
32
goto :eof
33

34
:rx
35
call :diag rx
36
goto :eof
37

38
:reset
39
set resettype=7
40
if "%2"=="rx" set resettype=1
41
if "%2"=="tx" set resettype=2
42
if "%2"=="rss" set resettype=4
43
echo resetting type %resettype%...
44
call :dowmic netkvm_diagreset set type=%resettype%
45
goto :eof
46

47
:rss
48
call :diag rss
49
goto :eof
50

51
:rss_set
52
if "%2"=="" goto rss
53
call :dowmic NetKvm_DeviceRss set value=%2
54
goto :eof
55

56
:diag
57
call :dowmic netkvm_diag get %1 /value
58
goto :eof
59

60
:dowmic
61
::echo executing %*
62
wmic /namespace:\\root\wmi path %* | findstr /v __ | findstr /v /r ^^^$
63
goto :eof
64

65
:help
66
echo Example of WMI controls to NetKvm
67
echo %~nx0 command parameter
68
echo debug level            Controls debug level (use level 0..5)
69
echo cfg                    Retrieves current configuration
70
echo stat                   Retrieves all internal statistics
71
echo tx                     Retrieves internal statistics for transmit
72
echo rx                     Retrieves internal statistics for receive
73
echo rss                    Retrieves internal statistics for RSS
74
echo rss 0/1                Disable/enable RSS device support
75
echo reset [tx^|rs^|rss]      Resets internal statistics(default=all)
76
goto :eof
77

78

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.