有朋友在用 NodeQuery 的吗?最近看他们的 API,返回参数如下:
{
"status": "OK",
"data": [
[
{
"id": 763,
"status": "active",
"availability": "99.73%",
"update_time": 1405904402,
"name": "mta.nl.example.com",
"load_percent": 24,
"load_average": "0.63 0.42 0.26",
"ram_total": 248123392,
"ram_usage": 38334464,
"disk_total": 5284429824,
"disk_usage": 910610432,
"ipv4": "172.16.34.122",
"ipv6": "fe80::4fd:b8ff:fe00:143",
"current_rx": 407919,
"current_tx": 386858
},
{
"id": 547,
"status": "active",
"availability": "99.87%",
"update_time": 1405936444,
"name": "mta.us.example.com",
"load_percent": 16,
"load_average": "0.44 0.23 0.12",
"ram_total": 383397888,
"ram_usage": 50864128,
"disk_total": 10039418880,
"disk_usage": 1117908992,
"ipv4": "172.16.34.123",
"ipv6": "fe80::4fd:b8ff:fe00:144",
"current_rx": 400930,
"current_tx": 363048
}
]
]
}
基本上看返回值能够理解参数含义,但是 current_rx/current_tx 这两个参数单位到底是 bit 还是 byte 没搞清楚,除以 8 或除以 1024 感觉值和实际值都不太符合,官方也没详细的参数说明。