Rate This Document
Findability
Accuracy
Completeness
Readability

Analyzing Collected Data

The tool analyzes the collected data and presents the analysis result in a sequence diagram. The sequence diagram visualizes the function call information and the creation relationship between processes/threads to locate network problems. The tool also analyzes and displays compatibility information to identify the affinity between the K-NET network acceleration kit and users' services.

Command Function

Analyzes the collected data and displays the sequence diagram and compatibility information.

Syntax

Analyzing and displaying the sequence diagram:

devkit advisor knet [-h | --help] {seq-diag} {-d DIR_OF_RECORDED_DATA} {-o OUTPUT_FILE_PATH} [-c CONFIG_FILE_PATH] [--max-threads MAX_NUM_OF_THREADS_TO_DISPLAY] [--func-limit MAX_NUM_OF_FUNC_CALLS_TO_DISPLAY] [--tids TIDS_TO_DISPLAY] [-l {0,1,2,3} | --log-level {0,1,2,3}] [--set-timeout TIMEOUT]

Analyzing and displaying compatibility information:

devkit advisor knet [-h | --help] {compat} {-d DIR_OF_RECORDED_DATA} {-c JSON_CONF_FILE_PATH} [-l {0,1,2,3} | --log-level {0,1,2,3}] [--set-timeout TIMEOUT]

Parameter Description

Table 1 Parameters for displaying a sequence diagram

Parameter

Option

Description

-h/--help

-

Obtains help information. This parameter is optional.

-o

OUTPUT_FILE_PATH

Path to the sequence diagram file (in .md format) to be output. This parameter is mandatory.

-c

CONFIG_FILE_PATH

Configuration file path. This parameter is optional. If this parameter is set, only the function sequence diagrams in the configuration file are displayed. Otherwise, all function sequence diagrams in the data files are displayed.

-d

DIR_OF_RECORDED_DATA

Data file directory. This parameter is mandatory.

--max-threads

MAX_NUM_OF_THREADS_TO_DISPLAY

Maximum number of threads to be displayed. This parameter is optional. This parameter can be set when the number of threads is too large. This parameter conflicts with the --tids parameter and cannot be used together.

--func-limit

MAX_NUM_OF_FUNC_CALLS_TO_DISPLAY

Maximum number of times that a function can be displayed in a thread. This parameter is optional. This parameter can be set when a function has been called too many times.

--tids

TIDS_TO_DISPLAY

Thread ID array. This parameter is optional. If this parameter is set, only the sequence diagrams of the specified thread IDs are displayed. This parameter can be set when the number of threads is too large. This parameter conflicts with the --max-threads parameter and cannot be used together.

-l/--log-level

0/1/2/3

Log level, which defaults to 1. This parameter is optional.

  • 0: DEBUG
  • 1: INFO
  • 2: WARNING
  • 3: ERROR

--set-timeout

-

Timeout interval of a task, in minutes. If the execution duration exceeds the timeout interval, the task exits. This parameter is optional. By default, there is no timeout interval. The task will be executed until it is complete.

Table 2 Parameters for displaying compatibility information

Parameter

Option

Description

-h/--help

-

Obtains help information. This parameter is optional.

-c

JSON_CONF_FILE_PATH

Path to the compatibility configuration file in JSON format. This parameter is mandatory.

NOTE:

The tool provides the configuration file template compat_conf.json, which is stored in the /root/CLI/DevKit-CLI-xxx-Linux-Kunpeng/advisor/devkitplugins/affinity/tools/compileopt/templates/compat_conf.json directory.

/root/CLI/DevKit-CLI-xxx-Linux-Kunpeng/ is the installation path of the command line tool.

-d

DIR_OF_RECORDED_DATA

Data file directory. This parameter is mandatory.

-l/--log-level

0/1/2/3

Log level, which defaults to 1. This parameter is optional.

  • 0: DEBUG
  • 1: INFO
  • 2: WARNING
  • 3: ERROR

--set-timeout

-

Timeout interval of a task, in minutes. If the execution duration exceeds the timeout interval, the task exits. This parameter is optional. By default, there is no timeout interval. The task will be executed until it is complete.

Example

Display the sequence diagram and supported functions:
1
devkit advisor knet -h

Command output:

OVERVIEW
    Run this command to analyze the POSIX call information collected by librecord.so, generate a sequence diagram or display compatibility.

USAGE
    devkit advisor knet [POSITIONAL ARGUMENTS] [OPTIONS]

POSITIONAL ARGUMENTS
      {seq-diag,compat}     Modes of KNet
        seq-diag            Analyze and Display the Sequence Diagram
        compat              Analyze and Display the Compatibility

OPTIONS
      -l {0,1,2,3}, --log-level {0,1,2,3}
                            Specifies the log level of the current task. The default value is INFO.
      --set-timeout TIMEOUT
                            Specifies the timeout period of a task. By default, the timeout period is not set.