Skip to content

Commit efc6753

Browse files
authored
Merge pull request #24578 from vhorne/upd-diag
more edits from 10-1
2 parents 2dafa7a + 7b8a2df commit efc6753

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

articles/azure-stack/azure-stack-diagnostics.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,18 @@ To run the log collection tool on an integrated system, you need to have access
114114
```
115115
$ip = "<IP OF THE PEP VM>" # You can also use the machine name instead of IP here.
116116
117-
$pwd= ConvertTo-SecureString "<localadminpwd>" -AsPlainText -Force
117+
$pwd= ConvertTo-SecureString "<CLOUD ADMIN PASSWORD>" -AsPlainText -Force
118118
$cred = New-Object System.Management.Automation.PSCredential ("<DOMAIN NAME>\CloudAdmin", $pwd)
119119
120120
$shareCred = Get-Credential
121121
122122
$s = New-PSSession -ComputerName $ip -ConfigurationName PrivilegedEndpoint -Credential $cred
123-
$fromDate = (Get-Date).AddHours(-1) #provide the date that includes the period for your issue
123+
124+
$fromDate = (Get-Date).AddHours(-8)
125+
$toDate = (Get-Date).AddHours(-2) #provide the time that includes the period for your issue
124126
125-
Invoke-Command -Session $s {
126-
127-
Get-AzureStackLog -OutputPath "\\HLH\c$\logs" -OutputSharePath "<EXTERNAL SHARE ADDRESS>" -OutputShareCredential $using:shareCred -FilterByRole Storage -FromDate $using:fromDate
128-
}
127+
Invoke-Command -Session $s { Get-AzureStackLog -OutputPath "\\<HLH MACHINE ADDREESS>\c$\logs" -OutputSharePath "<EXTERNAL SHARE ADDRESS>" -OutputShareCredential $using:shareCred -FilterByRole Storage -FromDate $using:fromDate -ToDate $using:toDate}
128+
129129
if($s)
130130
{
131131
Remove-PSSession $s
@@ -134,10 +134,11 @@ if($s)
134134

135135
- When you collect logs from the PEP, specify the `OutputPath` parameter to be a location on the HLH machine. Also ensure that the location is encrypted.
136136
- The parameters `OutputSharePath` and `OutputShareCredential` are optional and are used when you upload logs to an external shared folder. Use these parameters *in addition* to `OutputPath`. If `OutputPath` is not specified, the log collection tool uses the system drive of the PEP VM for storage. This might cause the script to fail because the drive space is limited.
137+
- As shown in the previous example, the `FromDate` and `ToDate` parameters can be used to collect logs for a particular time period. This can come in handy for scenarios like collecting logs after applying an update package on an integrated system.
137138

138139
**Parameter considerations for both ASDK and integrated systems:**
139140

140-
- As shown in the previous ASDK example, the `FromDate` and `ToDate` parameters can be used to collect logs for a particular time period. This can come in handy for scenarios like collecting logs after applying an update package on an integrated system. If the `FromDate` and `ToDate` parameters are not specified, logs are collected for the past four hours by default.
141+
- If the `FromDate` and `ToDate` parameters are not specified, logs are collected for the past four hours by default.
141142
- You can use the `TimeOutInMinutes` parameter to set the timeout for log collection. It is set to 150 (2.5 hours) by default.
142143

143144
- Currently, you can use the `FilterByRole` parameter to filter log collection by the following roles:
@@ -166,8 +167,8 @@ A few additional things to note:
166167

167168
* The command takes some time to run based on which role(s) the logs are collecting. Contributing factors also include the time duration specified for log collection, and the numbers of nodes in the Azure Stack environment.
168169
* After log collection completes, check the new folder created in the `-OutputPath` parameter specified in the command.
169-
* A file called `Get-AzureStackLog_Output.log` is created in the folder. It contains the zip files and includes the command output. This output can be used for troubleshooting any failures in log collection.
170-
* Each role has its logs inside individual zip files. Depending on the size of the collected logs, a role may have its logs split in to multiple zip files. For such a role, if you want to have all the log files unzipped in to a single folder, use a tool that can unzip in bulk (such as 7zip). Select all the zipped files for the role, and select **extract here**. This unzips all the log files for that role in a single merged folder.
170+
* Each role has its logs inside individual zip files. Depending on the size of the collected logs, a role may have its logs split in to multiple zip files. For such a role, if you want to have all the log files unzipped in to a single folder, use a tool that can unzip in bulk (such as 7zip). Select all the zipped files for the role, and select **extract here**. This unzips all the log files for that role in a single merged folder.
171+
* A file called `Get-AzureStackLog_Output.log` is also created in the folder that contains the zipped log files. This file is a log of the command output, which can be used for troubleshooting problems during log collection.
171172
* To investigate a specific failure, logs may be needed from more than one component.
172173
- System and Event logs for all infrastructure VMs are collected in the *VirtualMachines* role.
173174
- System and Event logs for all hosts are collected in the *BareMetal* role.

0 commit comments

Comments
 (0)