monitor_resource
属性 | 类型 | 描述 |
---|---|---|
id | bigint | 主键 |
type | varchar(20) | LOCAL或 AWS 或ALIYUN |
cpu_total | int | cpu总数 |
cpu_reserve | int | cpu保留数 |
cpu_used | int | cpu已使用数 |
memory_total | int | 内存总数 |
memory_used | int | 内存已使用数 |
node_resource
属性 | 类型 | 描述 |
---|---|---|
id | bigint | 主键 |
monitor_resource | bigint | 来源cluster id |
cpu_total | int | cpu总数 |
cpu_reserve | int | cpu保留数 |
cpu_used | int | cpu已使用数 |
memory_total | int | 内存总数 |
memory_used | int | 内存已使用数 |
查询资源 **/api/v1/monitor/{type}, GET
如 type 为 "LOCAL"
{
"type": "LOCAL",
"cpuTotal": 32,
"cpuScheduler":30,
"cpuAlloc":20,
"cpuFree":10,
"memoryTotal":100,
"memoryUsed":20,
"memoryFree":80,
"memoryPercentage":10,
"memoryFreePercentage":90
}
查看类型为 type下 所有node 资源使用情况
/api/v1/monitor/{type}/nodes GET
[
{
"hostname": "hahaha",
"memoryTotal":100,
"cpuTotal":20
},
{
"hostname":"xixixi",
"memoryTotal":100,
"cpuTotal":20
}
]
查询资源 /api/v1/monitor/{type}/cluster/cpu/range?startTime=123&endTime=456&step=15s
如果不传step,默认为 10S, GET
[
{
"currentTime":123(long型的时间戳),
"cpuPercentage": 20
},
{
"currentTime":138(long型的时间戳),
"cpuPercentage": 30
}
……
]
查看node hostName为"computer"的cluster node的 资源使用情况
/api/v1/monitor/{type}/node/computer GET
{
"hostname": "computer",
"cpuTotal": 32,
"cpuScheduler":30,
"cpuAlloc":20,
"cpuFree":10,
"memoryTotal":100,
"memoryUsed":20,
"memoryFree":80,
"memoryPercentage":10,
"memoryFreePercentage":90
}
job为slurm_job_running或者slurm_job_pending
查询job /api/v1/monitor/{type}/job/{jobProperty}
[
{
"state":"slurm_job_pending",
"number":"200"
},
{
"state":"slurm_job_running",
"number":"10"
}
]
查询资源 /api/v1/monitor/{type}/{hostName}/cpu/range?startTime=123&endTime=456&step=15s
如果不传step,默认为 10S, GET
[
{
"currentTime":123(long型的时间戳),
"cpuPercentage": 20
},
{
"currentTime":138(long型的时间戳),
"cpuPercentage": 30
}
……
]
网友评论