Updated on 2022-02-21 GMT+08:00

Collecting Node Data

Function

This command is used to collect all data related to IEF on a node for IEF O&M personnel to locate faults.

The following table lists the data to be collected.

Table 1 Data to be collected

Category

Item

Description

System data

Hardware architecture

Collect the arch command output and determine the type of the installed IEF software.

CPU information

Parse the /proc/cpuinfo file and generate a CPU information file.

Memory information

Collect the free -h command output.

Hardware information

Collect the outputs of the df -h and mount commands.

Network information

Collect the netstat -anp command output and copy the /etc/resolv.conf and /etc/hosts files.

Process information

Collect the ps -aux command output.

Time information

Collect the outputs of the date and uptime commands.

Historical commands

Collects all commands entered by the user.

IEF data

IEF database data

Copy the /opt/IEF/Edge-core/bin/edge.db file.

IEF log files

Copy all files in the /var/IEF/sys/log directory.

IEF service files

Copy the edgecore.service, edgelogger.service, edgemonitor.service, and edgedaemon.service files in the /lib/systemd/system/ directory.

IEF software version

Copy the /opt/IEF/version file.

IEF certificates

Copy all files in the /opt/IEF/Cert/ directory.

IEF encryption materials

Copy all files in the /opt/material/ directory.

Edge-Core (including Edge-daemon) configuration file

Copy all files in the /opt/IEF/Edge-core/conf/ directory.

Edge-Logger configuration file

Copy all files in the /opt/IEF/Edge-logger/conf/ directory.

Edge-Monitor configuration file

Copy all files in the /opt/IEF/Edge-monitor/conf/ directory.

Docker data (required if Docker is enabled in IEF)

Docker version information

Collect the docker version command output.

Docker information

Collect the docker info command output.

Docker log information

Collect the journalctl -u docker.service command output.

Docker container information

Collect the docker ps -a command output.

Docker container configurations and logs

Copy all files in the /var/lib/docker/containers directory.

Docker image information

Collect the docker images command output.

GPU device information

Collect the /dev/nvidiactl /dev/nvidia-uvm /dev/nvidia? 2>&1 command output.

GPU kernel module information

Collect the lsmod |grep -e nvidia -e nvidia-uvm 2>&1 command output.

GPU information

Collect the /var/IEF/nvidia/bin/nvidia-smi 2>&1 command output.

GPU driver status information

Collect the systemctl status nvidia-drivers-loader command output.

NPU device information

Collect the ls /dev/davinci_manager /dev/hisi_hdc /dev/davinci? command output.

Syntax

edgectl collect [params]

Parameters

Table 2 Parameter description

Parameter

Mandatory

Shorthand

Description

--path

No

-p

Directory for caching IEF data and storing IEF data packages. The default value is the current directory.

--detail

No

-x

Whether to print internal logs.

Precautions

  • The command must be run as user root. Otherwise, the command will fail.
  • During the command execution, you will be prompted to enter yes or y to confirm the node data collection.
  • The collected data is stored in the package named data_{timestamp}.tar.gz in a specific directory.

Example

Collect IEF data.

edgectl collect

If the following information is displayed, enter yes or y:

Do you agree that edgectl collects data on this machine (yes/no)? y  

The following is an example of the command output:

Data packet name: data_2020-03-18-10-47-47.tar.gz.

+----------------------------------+
| Data collection process succeed. |
+----------------------------------+

The name of the cached package is displayed in the command output.