[关闭]
@sewise-dev 2018-03-21T11:04:04.000000Z 字数 992 阅读 687

微录播主机信息获取

微录播

更新历史

编号 版本 说明 作者 日期
1 v1.0 1.创建文档 huanghy 2017-09-05

目录


1. 主动上报主机信息

主机通过rpc的方式主动上报信息到node服务端,每10s上报一次。

上报参数
参数 类型 说明
totalmem int 总的内存
freemem int 剩余的内存(单位:btye)
eth array 网卡信息(详细信息如下)
hds array 硬盘信息(详细信息如下)
vfs object 存储空间(详细信息如下)
onlineTime int 在线时长(单位:s)
updateTime string 更新时间(格式:yyyy-MM-dd HH:mm:ss)

eth

参数 类型 说明
name string 网卡名称
rx int 接收字节数(单位:btye)
tx int 发送字节数(单位:btye)
addressIP string 网卡地址

hds

参数 类型 说明
name string 硬盘名称
Power_On_Hours int 已经运转的时长(单位:h)
Temperature_Celsius int 当前的温度(单位:℃)
vfs object 单个硬盘的存储空间(详细信息如下)

vfs

参数 类型 说明
total int 存储总空间
free int 剩余空间

2. 获取主机信息接口

暴露getHostMsg方法,node服务端通过rpc的方式获取主机信息。

主机参数
参数 类型 说明
totalmem int 总的内存
freemem int 剩余的内存(单位:btye)
eth array 网卡信息(详细信息如下)
hds array 硬盘信息(详细信息如下)
vfs object 存储空间(详细信息如下)
onlineTime int 在线时长(单位:s)
updateTime string 更新时间(格式:yyyy-MM-dd HH:mm:ss)

eth

参数 类型 说明
name string 网卡名称
rx int 接收字节数(单位:btye)
tx int 发送字节数(单位:btye)
addressIP string 网卡地址

hds

参数 类型 说明
name string 硬盘名称
Power_On_Hours int 已经运转的时长(单位:h)
Temperature_Celsius int 当前的温度(单位:℃)
vfs object 单个硬盘的存储空间(详细信息如下)

vfs

参数 类型 说明
total int 存储总空间
free int 剩余空间
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注