Command Parameter Description
The Kunpeng DevKit provides the command line tool to analyze applications during system migration.
Command Function
Queries the parameter descriptions of all commands.
- The following middleware can be analyzed: Oracle JDK, IBM J9, OpenJDK, Tomcat, Nginx, WebLogic, and TongTech.
- The following databases can be analyzed: MySQL, Oracle, Dameng, and GaussDB.
Syntax
Linux:
devkit porting sys-mig -h
Windows:
.\sys-mig.exe -h
Example
The following uses the Linux environment as an example. Run the following command to query the parameter descriptions of all commands:
devkit porting sys-mig -h
The command output is as follows:
USAGE
./devkit porting sys-mig [-c {stmt|sbom}] [-cf INPUT_PATH] [-d INPUT_PATH] [-o INPUT_PATH]
[-t FILE_PATH] [-f {html|json}] [-e {version|checkOutPath}] [-l {0,1,2,3}]
OPTIONS
-h, --help
Show this help message and exit.
-c, --command {stmt,sbom}
Type of information to be collected. The options are (default) stmt and sbom. Stmt generates a CSV report, and sbom generates a detailed HTML or JSON report.
-cf, --config <file>
Configuration file path of the input parameter.
-d, --directory <path> [<path> ...]
Directory of scanning for collected information. You can enter multiple directories (the current directory by default).
Separate multiple directories with spaces(Example: -d /home/jar /home/ear).
If the name of the folder to be scanned contains spaces, use single quotation marks(') to mark the parameter(Example: -d '/home/easy jar').
-o, --output <path>
Report output directory. (The default is the report directory where the binary file is located.)
-t, --template <file>
This parameter is used in stmt mode. Enter the template path of the CSV report. (By default, the CSV report is generated based on the built-in template.)
For details about the template, see ./resources/stmt_template_default.csv.
Built-in variables used in the template include ${cpuCores}, ${memory}, ${middleware}, ${dbType}, ${osSystem}, ${ip}, and ${hostName}, and they cannot be modified.
-f, --format {html,json} [{html,json} ...]
Format of the report generated in sbom mode. The options are HTML and json. You can select multiple report formats. The default value is HTML.
Separate multiple reports with spaces(Example: -f html json).
-e, --exclude-fields {version,checkOutPath} [{version,checkOutPath} ...]
Parameters hidden in sbom mode. The optional parameters are version and checkOutPath, and they can be selected at the same time.
Version indicates the component version number and checkOutPath indicates the component checkout path.
Separate multiple parameters with spaces(Example: -e version checkOutPath).
-l, --log-level {0,1,2,3}
Log level. The options are 0(DEBUG), 1(INFO), 2(WARNING), and 3(ERROR). The default value is 1(INFO).
-v, --version
Program version information.
EXAMPLE
./devkit porting sys-mig -c stmt -cf /home/config.conf -d /usr/local /usr/jar -o /home/report -t /home/template/stmt_template_default.csv -l 1
./devkit porting sys-mig -c sbom -cf /home/config.conf -d /home/jar -o /home/report -f html -l 1
Parent topic: System Migration