No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference 10

OceanStor 5300 V3, 5500 V3, 5600 V3, 5800 V3, and 6800 V3 Storage System V300R003

"Based on the CLI, this document describes how to use various commands classified by functions and how to set the CLI and manage the storage system through these commands. The document that you browse online matches the latest C version of the product. Click Download to download documents of other C versions."
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
export event

export event

Function

The export event command is used to export the logs or events generated by the storage system. Use this command when you want to export logs or events and use them to find out the alarm causes or check device running status.

Format

export event event_type=? ip=? user=? password=? path=? [ port=? ] [ protocol=? ] [ clean_device_file=? ] [ controller_id=? ]

Parameters

Parameter

Description

Value

event_type=? Type of an event that you want to export.

The value can be "event", "log", "disk_log" , "all_log" or "hssd_log", where:

  • "event": indicates events.
  • "log": indicates logs.
  • "disk_log": indicates logs of disks.
  • "all_log": indicates all logs of the system.
  • "hssd_log": indicates logs of all hssd.
ip=? IP address of an File Transfer Protocol (FTP) server or a Secure File Transfer Protocol (SFTP) server.
NOTE:
To export log files, an FTP server or a Secure File Transfer Protocol (SFTP) server must be available and is accessible to the storage system.

-

user=? User name for logging in to an FTP server or a SFTP server.

The value contains 1 to 63 characters.

password=? Password for logging in to an FTP server or a SFTP server.

The value contains 1 to 63 characters.

path=? File name and path to an exported log file.

The path must start with "/".Path for saving events or logs on the FTP/SFTP server. The file name must be supported by the FTP and SFTP server. 1:"/test/" indicates that events or logs are saved in the "test" folder on the FTP/SFTP server. The file name is automatically generated.2:"/test" indicates that events or logs are saved in the "test" file.3:If you specify the file name, we recommend you add the file suffix. Add suffix ".tgz" when "event_type" is set to "event", "log", "disk_log", "all_log" or "hssd_log". If you do not specify the suffix, CLI will add it automatically.

port=? ID of the port on an FTP server or a SFTP server.

The value must be an integer from 1 to 65535. l:If "protocol" is set to "FTP", the default value is "21".

  • If "protocol" is set to "SFTP", the default value is "22".
protocol=? Transfer protocol type.

The value can be "FTP" or "SFTP". The default value is "SFTP".

To ensure the security of data transfer, you are advised to use Secure File Transfer Protocol (SFTP).

clean_device_file=? Whether to delete the event file on the storage system memory after the event file is exported to an FTP server or an SFTP server. This parameter is valid only when "event_type=?" is set to "event".

The value can be "yes" or "no", where:

  • "yes": The event file on the storage system memory will be deleted after the event file is exported to an FTP server or a SFTP server.
  • "no": The event file on the storage system memory will not be deleted after the event file is exported to an FTP server or a SFTP server.
The default value is "yes".
controller_id=? ID of a controller.

Controller ID separated by comma, the value is in the format of "XA","XB","XC","XD", where the "X" is an integer ranging from 0 to 3, for example: "0A","1C". This parameter can be specified only when "event_type" is set to "log", "disk_log", "hssd_log", or "all_log".

Level

Administrator

Usage Guidelines

When running this command to export the logs, the logs of all controllers will be exported at the same time.

This command can export log files only to an FTP server or a SFTP server connected to the storage system.

NOTE:
Prerequisites for using this command:
  • The FTP server or SFTP server is accessible to the storage system.
  • The FTP service or SFTP service has been started on the server.

If the storage system serves as a server in the file transfer with external systems, it supports the SFTP service only. If the storage system serves as a client, it supports both the FTP and SFTP services.

It will take several minutes to collect and export the log, disk_log or all_log.

Example

  • Export system events to an FTP server, where the IP address of the FTP server is "192.168.8.211", the user name for logging in to the FTP server is "admin", and the password is "123456". The exported events will be stored in the root directory of the FTP server, and the exported events will be saved as the "event.tgz" file.

    admin:/>export event event_type=event ip=192.168.8.211 user=admin password=****** path=/event.tgz protocol=FTP
    Command executed successfully.
  • Export system logs to an FTP server, where the IP address of the FTP server is "192.168.8.211", the user name for logging in to the FTP server is "admin", and the password is "admin". The exported logs will be stored in the root directory of the FTP server, and the exported logs will be saved with the default file name.

    admin:/>export event event_type=log ip=192.168.8.211 user=admin password=***** path=/ protocol=FTP
    WARNING: It will take several minutes to collect and export the information.
    Have you read warning message carefully?(y/n)y
    Are you sure you really want to perform the operation?(y/n)y
    Controller ID: 0A
    Package Path: /log_controller_0A_MAIN.tgz
    Export Result: Successful
    Controller ID: 0B
    Package Path: /log_controller_0B.tgz
    Command executed successfully.
  • Export disk logs to an FTP server, where the IP address of the FTP server is "192.168.8.211", the user name for logging in to the FTP server is "admin", and the password is "admin". The exported logs will be stored in the root directory of the FTP server, and the exported logs will be saved with the default file name.

    admin:/>export event event_type=disk_log ip=192.168.8.211 user=admin password=***** path=/ protocol=FTP
    WARNING: It will take several minutes to collect and export the information.
    Have you read warning message carefully?(y/n)y
    Are you sure you really want to perform the operation?(y/n)y
    Controller ID: 0A
    Package Path: /dha_ctrl0A.tgz
    Export Result: Successful
    Controller ID: 0B
    Package Path: /dha_ctrl0B.tgz
    Command executed successfully.
  • Export all logs of the system to an FTP server, where the IP address of the FTP server is "192.168.8.211", the user name for logging in to the FTP server is "admin", and the password is "admin". The exported logs will be stored in the root directory of the FTP server, and the exported logs will be saved with the default file name.

    admin:/>export event event_type=all_log ip=192.168.8.211 user=admin password=***** path=/ protocol=FTP
    WARNING: It will take several minutes to collect and export the information.
    Have you read warning message carefully?(y/n)y
    Are you sure you really want to perform the operation?(y/n)y
    Controller ID: 0A
    Package Path: /log_controller_0A_MAIN.tgz
    Export Result: Successful
    Controller ID: 0B
    Package Path: /log_controller_0B.tgz
    Command executed successfully.
  • Export HSSD logs to an FTP server, where the IP address of the FTP server is "192.168.8.211", the user name for logging in to the FTP server is "admin", and the password is "admin". The exported logs will be stored in the root directory of the FTP server, and the exported logs will be saved with the default file name.

    admin:/>export event event_type=hssd_log ip=192.168.8.211 user=admin password=***** path=/ protocol=FTP
    WARNING: It will take several minutes to collect and export the information.
    Have you read warning message carefully?(y/n)y
    Are you sure you really want to perform the operation?(y/n)y
    Controller ID: 0A
    Package Path: /hssd_log_0A.tgz
    Export Result: Successful
    Controller ID: 0B
    Package Path: /hssd_log_0B.tgz
    Command executed successfully.

System Response

None

Translation
Download
Updated: 2019-07-22

Document ID: EDOC1000084195

Views: 362615

Downloads: 1590

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next