- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-AIOps commands | 119.22 KB |
AI for log aggregation and root cause analysis commands
AI for device anomaly detection commands
ai key-resource-monitor enable
display ai key-resource-monitor logfile
AIOps commands
Common AIOps commands
ai-service
Use ai-service to enter AI service view.
Syntax
ai-service
Views
System view
Predefined user roles
network-admin
Usage guidelines
To enable AI ECN, first enter AI service view and then enter AI ECN view.
Examples
# Enter AI service view.
<Sysname> system-view
[Sysname] ai-service
[Sysname-ai-service]
display ai-service model
Use display ai-service model to display information about the currently loaded AI model files.
Syntax
display ai-service model
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
After the AI system load a model file, the enabled AI services automatically read the file and infer from the vast data within using intelligent algorithms, ultimately obtaining optimal configuration values to fulfill AI functionalities.
You can execute this command to view information about the current and loaded model files in the AI system.
Restrictions and guidelines
If the system has not loaded any model packages, the output of this command is empty.
Examples
# Displays information about AI model files.
<Sysname> display ai-service model
Model Name File Name
ai-ecn flash:/ai-ecn.cambricon
Table 1 Command output
Field |
Description |
Model Name |
The AI service to which the AI model file is applicable. Values include: ai-ecn—AI ECN. |
File Name |
AI model file storage path and filename. |
Related commands
model load
model load
Use model load to load an AI model file.
Syntax
model load filename
Views
AI service view
Predefined user roles
network-admin
Parameters
filename: Specifies the complete storage path and filename of the model package file.
Usage guidelines
Prerequisites
Upload the model file provided by the manufacturer to the flash:/ path on the device before you execute this command to load the model file.
Application scenarios
The AI system provides a common platform for model management, data acquisition, and preprocessing for AI services on the device that use intelligent algorithms for inference. It also supports the integration of processed data into the device by loading models to the device.
Use this command to load a model file to the device. Enabled AI services will then automatically read the file, infer from the vast data in the model by using AI algorithms, and derive optimal configuration values to fulfill AI functionalities.
Restrictions and guidelines
The AI system verifies the model files to be loaded. If verification fails, file loading will fail. To avoid verification failure, after downloading a model file, do not change its filename or content.
Examples
# Load the AI ECN model file.
<Sysname> ai-service
[Sysname-ai-service] model load flash:/ai-ecn.cambricon
Related commands
display ai-service model
model unload
model unload
Use model unload to unload an AI model file.
Syntax
model unload filename
Views
AI service view
Predefined user roles
network-admin
Parameters
filename: Specifies the model package filename.
Usage guidelines
You can use this command to remove loaded model files from the AI system.
Restrictions and guidelines
The AI system verifies the model files to be unloaded. If verification fails, the unloading will fail.
Examples
# Unload the AI ECN model file.
<Sysname> ai-service
[Sysname-ai-service] model unload flash:/ai-ecn.cambricon
AI ECN commands
ai ai-ecn enable
Use ai ai-ecn enable to enable AI ECN and set the AI ECN mode.
Use undo ai ai-ecn enable to restore the default.
Syntax
ai ai-ecn enable mode { centralized | distributed | neural }
undo ai ai-ecn enable
Default
AI ECN is disabled.
Views
AI service view
Predefined user roles
network-admin
Parameters
centralized: Specifies that the analyzer calculates the ECN triggering threshold and communicates it to devices.
distributed: Specifies that the device itself intelligently sets the optimal ECN triggering threshold.
neural: Specifies that the neural network algorithm of the device intelligently sets the optimal ECN triggering threshold.
Usage guidelines
This function enables the device to collect and send traffic characteristics to the AI service component on an analyzer or the local AI service component. The AI service component dynamically sets the optimal ECN triggering threshold for a queue to achieve low delay and high throughput.
After the device is rebooted, the ECN triggering thresholds set by the analyzer or AI service component are cleared.
The AI ECN feature is limited by licenses. To use the AI ECN feature, first install the corresponding licenses. For more information, see Fundamentals Configuration Guide.
Examples
# Enable AI ECN and set the AI ECN mode to centralized.
<Sysname> system-view
[Sysname] ai-service
[Sysname-ai-service] ai ai-ecn enable mode centralized
Related commands
queue (AI ECN view)
ai ai-ecn save
Use ai ai-ecn save to save the AI ECN log file.
Syntax
ai ai-ecn save logfile
Views
Any view
Predefined user roles
network-admin
Parameters
logfile: Saves the AI ECN log file to the device storage.
Usage guidelines
After AI ECN is enabled for a queue on the device, execution of this command will log the operations for adjusting the queue's optimal ECN threshold and the basis for the adjustment (the data flow preprocessing result) into the AI ECN log file. The device automatically saves this log file in its local storage. The log file that AI ECN automatically saves typically contains the AIECN string as an identifier.
The AI ECN log file can help operations and technical support analyze the effectiveness of AI ECN.
Examples
# Save the AI ECN log file.
<Sysname> ai ai-ecn save logfile
Related commands
ai ai-ecn enable
display ai ai-ecn logfile
queue (AI ECN view)
ai-ecn
Use ai-ecn to enter AI ECN view.
Syntax
ai-ecn
Views
AI service view
Predefined user roles
network-admin
Usage guidelines
To enable AI ECN, first enter AI service view and then enter AI ECN view.
Examples
# Enter AI ECN view.
<Sysname> system-view
[Sysname] ai-service
[Sysname-ai-service] ai-ecn
[Sysname-ai-service-ai-ecn ]
display ai ai-ecn logfile
Use display ai ai-ecn logfile to display information in the AI ECN log file.
Syntax
display ai ai-ecn logfile [ tail line-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
tail line-number: Displays the most recent lines of information in the log file. The line-number argument specifies the number of lines to be displayed, in the range of 1 to 1000. If you do not specify this option, the command displays all information in the log file.
Examples
# Display information in the AI ECN log file.
<Sysname> display ai ai-ecn logfile
time="2023-05-12 14:14:06" level=info msg="start collect AIECN config change log"
time="2023-05-12 14:29:53" level=info msg="switch ip: 127.0.0.1, interface index: 104, queue: 5, start inspire adjust config process, current config: kmin = 1000, kmax = 8000, pmax = 20, at inspire step 1\n"
time="2023-05-12 14:30:00" level=info msg="switch ip: 127.0.0.1, interface index: 104, queue: 5, start inspire adjust config process, current config: kmin = 1000, kmax = 8000, pmax = 20, at inspire step 1\n"
Table 2 Command output
Field |
Description |
time |
Time when the ECN thresholds were set. |
switch ip |
Device IP address. |
level=info msg |
Detailed information of ECN threshold deployment, including: · interface index—Index of an interface. · queue—Number of the queue for which ECN thresholds were set on the interface. · current config—Configuration parameters issued, including: ¡ kmin—Minimum ECN threshold. ¡ kmax—Maximum ECN threshold. ¡ pmax—Probability of packets being ECN marked. |
Related commands
queue (AI ECN view)
queue (AI ECN view)
Use queue to enable AI ECN for a queue.
Use undo queue to restore the default.
Syntax
queue queue-id enable
undo queue queue-id
Default
The default for this command varies by device model.
Views
AI ECN view
Predefined user roles
network-admin
Parameters
queue-id: Specifies a queue by its ID. The value range for this argument is 0 to 7.
sa: Sends traffic characteristics to the AI service component on an analyzer.
Usage guidelines
This function enables the device to collect and send traffic characteristics to the AI service component on an analyzer or the local AI service component. The AI service component dynamically sets the optimal ECN triggering threshold for a queue to achieve low delay and high throughput.
This feature is mutually exclusive with the following settings:
· Applying a WRED table to an interface.
· Configuring WRED parameters for a queue.
· Setting the WRED exponent for average queue size calculation.
· Enabling ECN for a queue.
· Enabling global WRED Smart ECN.
AI ECN requires a license to work. Install a valid license before using this function. For more information about licensing, see license management in Fundamentals Configuration Guide.
After the device is rebooted, the ECN triggering thresholds set by the AI service component are cleared.
Examples
# Enable AI ECN for a queue 1.
<Sysname> system-view
[Sysname] ai-service
[Sysname-ai-service] ai-ecn
[Sysname-ai-service-ai-ecn] queue 1 enable
Related commands
qos wred apply (ACL and QoS Command Reference)
qos wred queue (ACL and QoS Command Reference)
qos wred queue ecn (ACL and QoS Command Reference)
qos wred queue weighting-constant (ACL and QoS Command Reference)
qos wred smart-ecn enable (ACL and QoS Command Reference)
queue (WRED table view) (ACL and QoS Command Reference)
queue ecn (ACL and QoS Command Reference)
AI for log aggregation and root cause analysis commands
ai ai-fault-analysis enable
Use ai ai-fault-analysis enable to enable AI for log aggregation and root cause analysis.
Use undo ai ai-fault-analysis enable to restore the default.
Syntax
ai ai-fault-analysis enable
undo ai ai-fault-analysis enable
Default
AI for log aggregation and root cause analysis is disabled.
Views
AI service view
Predefined user roles
network-admin
Usage guidelines
The information center can receive log information generated by all modules and classify and manage the log information according to modules and log levels. However, users still cannot quickly locate key information from massive log information or perform accurate and efficient fault location based on the key log information.
This function can implement the following:
The AI process aggregates all log information received by the information center over a period of time based on log correlation. It generates a summary file according to the log aggregation result, simplifying log information. For example, multiple logs from a main interface and its subinterfaces caused by a main interface fault will be aggregated into one log summary.
The AI process derives potential fault causes from aggregated log results and fault root cause model files in devices, and exports root cause analysis files as references for users.
Examples
# Enable AI for log aggregation and root cause analysis.
<Sysname> system-view
[Sysname] ai-service
[Sysname-ai-service] ai ai-fault-analysis enable
Related commands
display ai ai-fault-analysis
ai ai-fault-analysis save
Use ai ai-fault-analysis enable to save the log aggregation summary file or root cause analysis file.
Syntax
ai ai-fault-analysis save { logfile | root-cause | summary }
Default
By default, the system does not save the log aggregation summary file or root cause analysis file.
Views
Any view
Predefined user roles
network-admin
Parameters
logfile: Saves the log file.
root-cause: Saves the root cause analysis file.
summary: Saves the log aggregation summary file.
Examples
# Save the log aggregation summary file.
<Sysname> ai ai-fault-analysis save summary
Related commands
display ai ai-fault-analysis
display ai ai-fault-analysis
Use display ai ai-fault-analysis to display information in the log aggregation summary file or root cause analysis file.
Syntax
display ai ai-fault-analysis { logfile | root-cause | summary } [ tail line-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
logfile: Displays the running log information for log aggregation summary and root cause analysis.
root-cause: Displays information in the root cause analysis file.
summary: Displays information in the log aggregation summary file.
tail line-number: Displays the most recent lines of information. The line-number argument specifies the number of lines, in the range of 1 to 1000. If you do not specify this option, the command displays all information in a file.
Usage guidelines
The AI process aggregates all the log information generated by modules based on the correlation between the logs. It then infer the root cause of faults according to the aggregated logs. This function enables users to find key log information quickly and locate faults accurately.
After you enable AI for log aggregation and root cause analysis, the system automatically creates a log aggregation summary file and a root cause analysis file. The system can have a maximum of two log aggregation summary files (one old and one new) and a maximum of two root cause analysis files (one old and one new).
Examples
# Display information in the log aggregation summary file.
<Sysname> display ai ai-fault-analysis summary
2021-03-09 11:56:00 to 11:56:59, device 77.1.1.41(7506X-G) encountered the following events: OSPF 8 IP conflicts for 11.11.11.1 on interface Vlan-interface11. Impact: OSPF conflict IP address 11.11.11.1. Aggregated entries: 1. Highest severity level: Information.
2021-03-09 11:55:00 to 11:55:59, device 77.1.1.41(7506X-G) encountered the following events: 1. IRF port 1 went down. 2. Interface Ten-GigabitEthernet1/0/50 physical down. Impact: IRF port down. Aggregated entries: 4. Highest severity level: Critical.
2021-03-09 11:54:00 to 11:54:59, device 77.1.1.41(7506X-G) encountered the following events: 1. BFD Session[3.3.3.1/3.3.3.2] change from down to up. 2. Interface GigabitEthernet0/5 physical down. 3. Interface GigabitEthernet0/5 physical up. Aggregated entries: 10. Highest severity level: Error.
# Display information in the root cause analysis file.
<Sysname> display ai ai-fault-analysis root-cause
2021-03-09 11:57:43, fault OSPF_Neighbor_Down occurred on (device=77.1.1.41, route=OSPF, ospfId=600). root issue [severity=Notification], no causes found. Details: OSPF 600 Neighbor 6.6.6.12(Ten-GigabitEthernet2/0/51) changed from FULL to DOWN.
2021-03-09 11:54:09, fault BFD_Session_Down occurred on (device=77.1.1.41, session=3.3.3.1/3.3.3.2). Possible root cause: [severity=Error, probability=1.0] 2021-03-09 11:54:05, device 77.1.1.41(7506X-G) encountered IFNET_PORT_PHY_UPDOWN on (device=77.1.1.41, mdc=1, chassis=0, slot=0, port=GigabitEthernet0/5). Details: Physical state on the interface GigabitEthernet0/5 changed to down.
2021-03-09 10:44:25, fault OSPFv3_Neighbor_Down occurred on (device=77.1.1.41, route=OSPFv3, ospfv3Id=1). Possible root causes: 1. [severity=Error, probability=1.0] 2021-03-09 10:44:25, device 77.1.1.41(7506X-G) encountered IFNET_INTVLAN_PHY_UPDOWN on (device=77.1.1.41, mdc=1, port=Vlan-interface200). Details: Physical state on the interface Vlan-interface200 changed to down. 2. [severity=Error, probability=0.7] 2021-03-09 10:44:25, device 77.1.1.41(7506X-G) encountered IFNET_PORT_PHY_UPDOWN on (device=77.1.1.41, mdc=1, chassis=0, slot=1, port=GigabitEthernet1/0/17). Details: Physical state on the interface GigabitEthernet1/0/17 changed to down.
# Display the running log information for log aggregation summary and root cause analysis.
<Sysname> display ai ai-fault-analysis logfile
2023-05-16 14:06:02,094 [process.py] [run] [DEBUG] [114] raw syslog: {'host': '127.0.0.1', 'message': '<190>May 16 14:06:02 2023 H3C %%10SHELL/6/SHELL_CMD_EXECUTESUCCESS: -Line=aux0-User=**-IPAddr=**; Command model load flash:/h3cAIECN-0-neural-040501.cambricon in view ai-service succeed to be executed. Result=Success.'}
Related commands
ai ai-fault-analysis enable
AI for device anomaly detection commands
ai key-resource-monitor enable
Use ai key-resource-monitor enable to enable AI for device anomaly detection.
Use undo ai key-resource-monitor enable command to restore the default.
Syntax
ai key-resource-monitor enable
undo ai key-resource-monitor enable
Default
AI for device anomaly detection is disabled.
Views
AI service view
Predefined user roles
network-admin
Usage guidelines
When managing and maintaining devices, you can manually configure alarm thresholds for different resources. For example, you can execute the resource-monitor resource command to configure alarm thresholds for CPU or ARP resources. The system will generate alarm messages when the specified thresholds are reached. However, these types of alarm messages cannot reflect changes in resource usage trends. Additionally, misconfiguring alarm thresholds can interfere with fault diagnosis and hinder the development of future AIOps methods.
This function uses AI algorithms to infer whether there are anomalies in the usage of various resources and table entries on the device. It triggers alarm messages after determining anomalies, which is more scientific compared to the traditional way of triggering alarms through static alarm threshold settings.
This function supports monitoring CPU usage and usage of various table resources. You can use the display resource-monitor command to view resource monitoring information.
Examples
# Enable AI for device anomaly detection.
<Sysname> system-view
[Sysname] ai-service
[Sysname-ai-service] ai key-resource-monitor enable
Related commands
display resource-monitor (Fundamentals Command Reference)
resource-monitor resource (Fundamentals Command Reference)
display ai key-resource-monitor logfile
Use display ai key-resource-monitor logfile to display the running log for AI-based device anomaly detection.
Syntax
display ai key-resource-monitor logfile [ tail line-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
tail line-number: Displays the most recent lines of information in the log file. The line-number argument specifies the number of lines to be displayed, in the range of 1 to 1000. If you do not specify this option, the command displays all information in the log file.
Usage guidelines
The running log for AI-based device anomaly detection is complex. It mainly helps technicians troubleshoot faults in device anomaly detection. To obtain detailed explanations for the log information, contact the technical support.
Examples
# Display the running log for AI-based device anomaly detection.
<Sysname> display ai key-resource-monitor logfile
[AD]2023/05/13 09:48:02 server.go:76: result in SCM is 0
[AD]2023/05/13 09:48:02 main.go:59: err in RPC_call rpc_deepar_init : device exist
[AD]2023/05/13 09:48:02 main.go:66: global.Global_deepar_alg_info: {4611828954922221568 676 4611828954922225664 4056 4611828954922223616 4 4611828954922224128 4 [0 0 0 0]}
[AD]2023/05/13 09:48:02 main.go:72: global.Global_host_init: {11 23085056 23093248 23101440 23109632}
[AD]2023/05/13 09:48:02 main.go:74: host_return: 10
[AD]2023/05/13 09:48:02 server.go:131: enable netconf ...
[AD]2023/05/13 09:48:04 server.go:150: global.Netconf_url: http://www.h3c.com/netconf/config:1.0
[AD]2023/05/13 09:48:04 main.go:120: AI APP "AD" is running ...
[AD]2023/05/13 09:48:04 main.go:123: starting maodel load test
[AD]2023/05/13 09:48:04 cfg_parase.go:120: AlgorithmList: map[Device/ExtPhysicalEntities:{0 170 1 5s mean 5s timestamp [1 2 3] {{2 26} map[Grubbs:49 HistogramBins:49 MeanSubtractionCumulation:49 MedianAbsoluteDeviation:49 SimpleStddevFromMovingAverage:49 StddevFromMovingAverage:49] {1 168}} map[console:True logfile:True]}]
[AD]2023/05/13 09:48:04 cfg_parase.go:120: AlgorithmList: map[Device/ExtPhysicalEntities:{0 170 1 5s mean 5s timestamp [1 2 3] {{2 26} map[Grubbs:49 HistogramBins:49 MeanSubtractionCumulation:49 MedianAbsoluteDeviation:49 SimpleStddevFromMovingAverage:49 StddevFromMovingAverage:49] {1 168}} map[console:True logfile:True]} ResourceMonitor/Monitors:{0 50 60 300s mean 5s timestamp [2 1] {{2 26} map[Grubbs:49 HistogramBins:49 MeanSubtractionCumulation:49 MedianAbsoluteDeviation:49 SimpleStddevFromMovingAverage:49 StddevFromMovingAverage:49] {0 0}} map[console:True logfile:True]}]
// Model initialization information
[AD]2015/02/11 16:41:34 model_load_option.go:175: finish load and reload_model =1
eptdev_name is ipcm-dma_ipcm-0
create an endpoint device dma
align result is 0
bytes and rc in read_to_buffer is 2935864 and 2935864 Finish read_to_buffer_dma buffer is 0.000000 after read function
write data to file from memory buffer AND BYTES IS2935864
remote path is /root/deepar_1.cambricon
rpc_call rpc_write_file /root/deepar_1.cambricon
close_mlu_fd (IPCM_SEND_FILE_DMA)
close_fd (IPCM_SEND_FILE_DMA)
ipcm_destroy_client_endpoint (IPCM_SEND_FILE_DMA)
// AI model loading or unloading log information for device anomaly detection
Related commands
ai key-resource-monitor enable