Collect OS Linux and Windows Logs
Collect OS Linux and Windows Logs
Scenario
NOTICE:
Do not directly decompress the InfoCollect_Linux.tar.gz tool package of the Linux version on a Windows
OS. Otherwise, the tool cannot collect logs because the lack of execution permission.
Prerequisites
Conditions
NOTE:
Run the whoami and id commands on the OS. In Figure 4-10, the current user is root and its user ID is 0.
Figure 4-10 Querying user information
Procedure
1. Confirm that the InfoCollect_Linux.tar.gz file has been uploaded to the server Linux OS. For
details, see Anexo 1 in the end of this document.
2. Run the following command to go to the directory where the InfoCollect_Linux.tar.gz file is
located, as shown in Figure 4-11.
cd
4. Run the following command to go to the InfoCollect_Linux directory, as shown in Figure 4-14.
cd InfoCollect_Linux
1. Run the following command to collect log files, as shown in Figure 4-17.
./infoCollect.sh
NOTE:
The log collection is successful if the message shown in Figure 4-18 is displayed.
NOTE:
o If the information shown in Figure 4-19 is displayed after log file collection is complete,
manually collect crash files to your local computer.
o Crash files are large. Manually collect crash files for fault diagnosis if necessary.
Figure 4-19 Crash file information
Scenario
Collect Windows log files of a server.
Prerequisites
Conditions
A Huawei V2, V3 or V5 server is available.
The InfoCollect_Windows.zip file has been uploaded to the target server.
You have logged in to Windows as an administrator.
You have backed up key data, and checked the CPU usage, memory usage, and available disk
space to ensure that InfoCollect is operating properly.
The IP address of the service network port on the target server must be pinged
Procedure
1. Decompress the InfoCollect_Windows.zip file, as shown in Figure 4-1.
Figure 4-1 Decompressing the InfoCollect_Windows.zip file
3. (Optional) Modify the config.ini configuration file to specify the log files to be collected, as
shown in Figure 4-3.
Figure 4-3 config.ini configuration file
Change the value of flag to specify whether to collect a log file. InfoCollect collects all log files by
default, as shown in Figure 4-4.
Figure 4-4 Modifying the config.ini configuration file
NOTE:
You are advised to check the log files to be collected. If you do not want to collect a log file, set flag to no.
The collection of Windows log files starts. Figure 4-6 shows collection process information.
NOTE:
The collection process will last several minutes.
Figure 4-6 Collection process information
After log file collection is complete, the information shown in Figure 4-7 is displayed.
Figure 4-7 Information indicating that log file collection is complete
NOTE:
If the information shown in Figure 4-8 is displayed after log file collection is complete, manually collect crash
files to your local computer. Crash files are large. You need to manually collect crash files for fault diagnosis.
Figure 4-8 Crash file information
5. Confirm that all log files are collected based on the content of the filelist.txt file in Figure 4-9.
You can filter the collected log files and then compress them into a package.
Figure 4-9 Content of the filelist.txt file
NOTE:
You are advised to compress log files before sending them to Huawei for analysis.
Anexo 1
NOTICE:
Server Linux OS log file collection: You need to upload the InfoCollect_Linux.tar.gz file to the
server Linux OS through Xftp. The path for storing the uploaded file cannot contain spaces.
1. Double-click Xshell.exe.
3. Enter the user name of the server Linux OS, and click OK.
4. Enter the password corresponding to the user name of the server Linux OS, and click OK.
7. Find the location of the InfoCollect_Linux.tar.gz file on the local PC, and select the uploading
path on the server Linux OS (the /home directory is recommended), as shown in Figure 2-5.
Figure 2-5 Selecting the uploading path
8. Drag the InfoCollect_Linux.tar.gz file from the left pane to the right pane.
The file uploading starts. When the InfoCollect_Linux.tar.gz file is displayed in the right pane,
the file is uploaded successfully, as shown in Figure 2-6.
Figure 2-6 Uploading succeeded
NOTE:
o Server Windows OS log file collection: You can use the network sharing function or a
tool such as a USB flash drive to upload the InfoCollect_Windows.zip file to the server
Windows OS (drive D is recommended).
o BMC, management module, and switch module log file collection: You only need to run
the InfoCollect.exe tool on the local console (which refers to the laptop running
Windows of a service engineer). For details about BMC log file collection, see Collecting
Rack and High-Density Server Log Files. For details about management module and
switch module log file collection, see Collecting E9000 Server Log Files.