
# hwi
#### 命令功能
hwi命令用于查询当前中断信息。
#### 命令格式
hwi
#### 使用指南
- 输入hwi即显示当前中断号、中断次数及注册中断名称。
- 若打开宏开关LOSCFG_CPUP_INCLUDE_IRQ，还会显示各个中断的处理时间（cycles）、CPU占用率以及中断类型。该宏开关可以通过make menuconfig在菜单项中开启Enable Cpup include irq使能：
  ```
  Kernel ---> Enable Extend Kernel ---> Enable Cpup ---> Enable Cpup include irq
  ```
  关于该宏开关更详细的介绍，参见[开发流程](https://support.huaweicloud.com/maintenance-LiteOS/zh-cn_topic_0312244421.html#ZH-CN_TOPIC_0312244421__zh-cn_topic_0175230412_section5280239320811)。
  
 
#### 使用实例
举例：
输入hwi。
#### 输出说明
1. 显示中断信息（LOSCFG_CPUP_INCLUDE_IRQ关闭）
   ```
   Huawei LiteOS # hwi
   InterruptNo     Count     Name
   35:             1364:
   36:             0:
   40:             79:       uart_pl011
   ```
   
2. 显示中断信息（LOSCFG_CPUP_INCLUDE_IRQ打开）
   ```
   Huawei LiteOS # hwi
   InterruptNo Count   Name   CYCLECOST  CPUUSE CPUUSE10s CPUUSE1s mode
           3:  1333            122       0.0    0.0       0.0    normal
           4:  0               0         0.0    0.0       0.0    normal
           5:  59   uart_pl011 305       0.0    0.0       0.0    normal
          12:  96      ETH     131       0.0    0.0       0.0    normal
   ```
   
 
