--
-- Table structure for table `ne_state`
--
DROP TABLE IF EXISTS `ne_state`;
CREATE TABLE `ne_state` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '网元类型',
  `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '网元ID',
  `ne_version` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '网元版本',
  `standby` int DEFAULT '0' COMMENT '主备状态 0-主 1-备',
  `nb_number` int DEFAULT '0' COMMENT '基站容量',
  `ue_number` int DEFAULT '0' COMMENT '用户容量',
  `serial_num` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '序列号',
  `expiry_date` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '许可证到期日期',
  `hostname` varchar(32) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '主机名 hostname',
  `os` varchar(196) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '操作系统 uname',
  `sys_cpu_usage` float DEFAULT '0' COMMENT 'cpu使用率-sys',
  `sys_mem_usage` float DEFAULT '0' COMMENT '内存使用率-sys',
  `sys_disk_usage` float DEFAULT '0' COMMENT '磁盘使用率-sys',
  `nf_cpu_usage` float DEFAULT '0' COMMENT 'cpu使用率-nf',
  `nf_mem_used` bigint DEFAULT '0' COMMENT '内存使用KB-nf',
  `refresh_time` bigint DEFAULT '0' COMMENT '刷新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_type_id_time` (`ne_type`,`ne_id`,`refresh_time`) USING BTREE COMMENT 'idx_state_ne_type_id_at'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='网元_状态记录内存/CPU/磁盘';

-- ----------------------------
-- COLUMN for ne_state
-- ----------------------------
