2018-12-04

monitor_resource

屬性 類型 描述
id bigint 主鍵
type varchar(20) LOCAL或 AWS 或ALIYUN
cpu_total int cpu總數(shù)
cpu_reserve int cpu保留數(shù)
cpu_used int cpu已使用數(shù)
memory_total int 內(nèi)存總數(shù)
memory_used int 內(nèi)存已使用數(shù)

node_resource

屬性 類型 描述
id bigint 主鍵
monitor_resource bigint 來源cluster id
cpu_total int cpu總數(shù)
cpu_reserve int cpu保留數(shù)
cpu_used int cpu已使用數(shù)
memory_total int 內(nèi)存總數(shù)
memory_used int 內(nèi)存已使用數(shù)

查詢資源 **/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,默認(rèn)為 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,默認(rèn)為 10S, GET

                    [
                                {
                                    "currentTime":123(long型的時間戳),
                                    "cpuPercentage": 20
                                },
                                {
                                    "currentTime":138(long型的時間戳),
                                    "cpuPercentage": 30
                                }
                                ……
                      ]
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,578評論 19 139
  • feisky云計算、虛擬化與Linux技術(shù)筆記posts - 1014, comments - 298, trac...
    不排版閱讀 4,355評論 0 5
  • 代碼GitHub地址 線性表 線性表需要相同的數(shù)據(jù)類型 線性表的處理方式都是先取代,后目的。比如刪除鏈?zhǔn)骄€性表的某...
    HikariCP閱讀 255評論 0 0
  • 說一說過去的“經(jīng)典”電視劇 文/艾草青團(tuán) 最近在回顧童年以及青春期看過的電視劇??吹絙站上長達(dá)幾個小時的視頻剪輯,...
    蓮蓉餡的艾草青團(tuán)閱讀 365評論 0 0
  • 天河村 天河村 每次路過都令人憔悴 酒精澆灌的容顏陪著曇花開 我的尸骨要埋在這里 我的羽毛要在這里腐爛 天河村 天...
    被窩閱讀 235評論 0 0

友情鏈接更多精彩內(nèi)容