Get-AksHciLogs

概要

建立壓縮資料夾,其中包含來自您所有 Pod 的記錄。

語法

Get-AksHciLogs [-virtualMachineLogs]
               [-agentLogs]
               [-eventLogs]
               [-kvaLogs] 
               [-downloadSdkLogs] 
               [-billingRecords] 

描述

建立壓縮資料夾,其中包含來自您所有 Pod 的記錄。 此命令會在 AKS 混合式工作目錄中建立名為 akshcilogs.zip 的輸出壓縮資料夾。 執行 ( 之後 Get-AksHciLogs ,akshcilogs.zip檔案的完整路徑會是輸出,例如 , C:\AksHci\0.9.6.3\akshcilogs.zip 其中 0.9.6.3 是 AKS 混合式版本號碼) 。 不使用旗標時,命令會收集所有記錄。

範例

範例 1

傳回最小的記錄檔大小。 此大小足以偵錯管理叢集 Pod、目標叢集 Pod、計費和下載問題的任何問題:

Get-AksHciLogs -EventLogs -KvaLogs -DownloadSdkLogs -BillingRecords

例如,針對計費問題,範例 1 應該夠好。

範例 2

除了範例 1 之外,此命令還會傳回所有 VM 記錄。 它大於範例 1,但小於範例 3:

Get-AksHciLogs -EventLogs -KvaLogs -DownloadSdkLogs -BillingRecords -VirtualMachineLogs

範例 3

此範例會傳回 MOC 記錄。 這是所有選項的最大。

Get-AksHciLogs

參數

-agentLogs

使用此旗標從 MOC 堆疊雲端代理程式和節點代理程式服務取得記錄。

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-eventLogs

使用此旗標取得傳送至事件檢視器的記錄。

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-virtualMachineLogs

使用此旗標從 AKS 混合式所建立的客體虛擬機器取得記錄。

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-kvaLogs

使用此旗標從 AKS 混合式主機取得記錄。

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-downloadSdkLogs

使用此旗標可取得下載記錄,以下載 AKS 混合式使用的二進位檔和映射。

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-billingRecords

使用此旗標可取得帳單記錄。

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

後續步驟

AksHci PowerShell 參考資料