Collect OS Linux and Windows Logs

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

1.

Collecting Linux Log Files

Scenario

Collect Linux log files of a server.

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

 A Huawei V2 or V3 server is available.


 The InfoCollect_Linux.tar.gz file has been uploaded to the target server.
 You have logged in to Linux as a user with an ID of 0, for example, root.
 You have backed up key data, and checked the CPU usage, memory usage, and available disk
space to ensure that InfoCollect is operating properly.

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

Figure 4-11  Going to the directory where the file is located


3. Run the following command to decompress the collection tool package, as shown in Figure 4-12
and Figure 4-13.

tar -zxvf InfoCollect_Linux.tar.gz

Figure 4-12  Decompressing the collection tool package

Figure 4-13  Decompressing the collection tool package

4. Run the following command to go to the InfoCollect_Linux directory, as shown in Figure 4-14.
cd InfoCollect_Linux

Figure 4-14  Going to the InfoCollect_Linux directory

1. Run the following command to collect log files, as shown in Figure 4-17.

./infoCollect.sh

Figure 4-17  Executing the Linux collection script

NOTE:

The collection process will last several minutes.

The log collection is successful if the message shown in Figure 4-18 is displayed.

Figure 4-18  Message indicating that the log collection is successful

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

2. Collecting Windows Log Files


Obtain InfoCollect_Linux.tar.gz package in the following link:

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

2. Go to the FusionServer Tools-InfoCollect-V125\InfoCollect-Windows\InfoCollect-Windows


directory, as shown in Figure 4-2.
Figure 4-2 Going to the FusionServer Tools-InfoCollect-V125\InfoCollect-Windows\InfoCollect-
Windows directory

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.

4. Right-click the infoCollect.bat file in the FusionServer Tools-InfoCollect-V125\InfoCollect-


Windows\InfoCollect-Windows directory and choose Run as administrator from the shortcut
menu, as shown in Figure 4-5.
Figure 4-5 Choosing Run as administrator

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

Uploading the Software Package


Procedure

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.

The Xshell client is accessed.

2. Run the following command to connect to the server Linux OS:

ssh IP address of the server Linux OS

The SSH User Name window is displayed, as shown in Figure 2-1.

Figure 2-1 SSH User Name

3. Enter the user name of the server Linux OS, and click OK.

The SSH User Authentication window is displayed, as shown in Figure 2-2.


Figure 2-2 SSH User Authentication

4. Enter the password corresponding to the user name of the server Linux OS, and click OK.

The connection to the server Linux OS starts.

The server Linux OS is successfully connected, as shown in Figure 2-3.

Figure 2-3 Connection succeeded


5. Click .

The SSH User Authentication window is displayed, as shown in Figure 2-4.

Figure 2-4 SSH User Authentication

6. Enter the password in Step 4, and click OK.

The main window of Xftp is displayed.

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.

You might also like