# SystemMonitor **Repository Path**: bianbu-oh/system-monitor ## Basic Information - **Project Name**: SystemMonitor - **Description**: demo通过napi获取系统运行信息 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-29 - **Last Updated**: 2025-07-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 系统监控 ![注意] 必须确保const.security.developermode.state = false 否则NAPI调用popen无法获取正确返回值 该demo通过napi获取系统运行信息,包括 1. 系统信息 1. CPU占用率 2. 内存占用率 3. 磁盘占用率 2. 网络信息 1. 运行中的网络设备 2. 网关 3. 物理地址 4. IP地址 5. 收发字节数 3. 硬件设备固件版本 1. EC芯片 2. 触摸板 3. 摄像头 主要流程: 1. 通过entry/src/main/cpp/napi_init.cpp编写C函数获取系统信息(字符串) 2. 通过entry/src/main/cpp/types/libentry/Index.d.ts开放给ets文件 3. 通过entry/src/main/ets/pages/Index.ets调用NAPI并实现打印