diff --git a/Kubernetes/windows/debug/collectlogs.ps1 b/Kubernetes/windows/debug/collectlogs.ps1 index 815ce305..c4edb05c 100644 --- a/Kubernetes/windows/debug/collectlogs.ps1 +++ b/Kubernetes/windows/debug/collectlogs.ps1 @@ -46,22 +46,6 @@ Get-hnspolicylist | Convertto-json -Depth 20 > policy.txt vfpctrl.exe /list-vmswitch-port > ports.txt powershell $BaseDir\dumpVfpPolicies.ps1 -switchName $Network -outfile vfpOutput.txt -# Loop through ports.txt file -$ports = @() -foreach($line in (Get-Content ports.txt)){ - $nline = $line.Split(":") - if ($nline[0].contains('Port name')) - { - $ports += $nline[1] - } -} - -# For each port, we want to call get-port-counter -foreach($port in $ports) -{ - "Get-port-counter for port: $port" >> ports.txt - vfpctrl /port $port.trim() /get-port-counter >> ports.txt -} ipconfig /allcompartments /all > ip.txt Get-NetIPAddress -IncludeAllCompartments >> ip.txt Get-NetIPInterface -IncludeAllCompartments >> ip.txt diff --git a/Kubernetes/windows/debug/dumpVfpPolicies.ps1 b/Kubernetes/windows/debug/dumpVfpPolicies.ps1 index 68d5505f..46d0ceb0 100644 --- a/Kubernetes/windows/debug/dumpVfpPolicies.ps1 +++ b/Kubernetes/windows/debug/dumpVfpPolicies.ps1 @@ -37,6 +37,7 @@ foreach ($port in $ports) { & $vfpCtrlExe /list-rule /port $portGuid | Out-File $outfile -Encoding ascii -Append & $vfpCtrlExe /port $portGuid /get-port-state | Out-File $outfile -Encoding ascii -Append & $vfpCtrlExe /port $portGuid /list-nat-range | Out-File $outfile -Encoding ascii -Append + & $vfpCtrlExe /port $portGuid /get-port-counter | Out-File $outfile -Encoding ascii -Append } & $vfpCtrlExe /switch $ports[0].'Switch Name' /get-switch-forwarding-settings > vswitchForwarding.txt \ No newline at end of file