swagger.yaml 7.8 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
basePath: /api/cmd
definitions:
  backend.AllInfo:
    properties:
      dcuInfo:
        items:
          $ref: '#/definitions/backend.DCULoad'
        type: array
      loginUserInfo:
        items:
          $ref: '#/definitions/backend.LoginUserInfo'
        type: array
      sysInfo:
        $ref: '#/definitions/backend.SysInfo'
    type: object
  backend.DCULoad:
    properties:
      dcuUtilPercent:
        type: number
      fan:
        type: string
      index:
        type: integer
      memTotal:
        type: integer
      memUsed:
        type: integer
      memUsedPercent:
        type: number
      name:
        type: string
      pwrAvg:
        description: 单位是瓦
        type: number
      pwrCap:
        description: 单位是瓦
        type: number
      temp:
        description: 单位是摄氏度
        type: number
    type: object
  backend.LoginUserInfo:
    properties:
      loginFrom:
        description: 登录方式
        type: string
      loginTime:
        description: 登录时间
        type: string
      name:
        description: 用户名
        type: string
      pid:
        description: 登录的接管进程
        items:
          type: integer
        type: array
      tty:
        description: 占用的终端
        type: string
    type: object
  backend.Metrics:
    properties:
      alg_bw:
        type: number
      bus_bw:
        type: number
      time:
        type: number
      wrong:
        type: integer
    type: object
  backend.RcclTestAllReducePrefResult:
    properties:
      args:
        description: 执行参数
        type: string
      dtk_path:
        description: dtk 库路径
        type: string
      raw_output:
        type: string
      results:
        items:
          $ref: '#/definitions/backend.RcclTestItem'
        type: array
      test_version:
        description: rccl-tests 版本信息
        type: string
      use_device:
        description: 使用的设备列表
        items:
          type: string
        type: array
    type: object
  backend.RcclTestItem:
    properties:
      count:
        type: integer
      in_place:
        $ref: '#/definitions/backend.Metrics'
      out_of_place:
        $ref: '#/definitions/backend.Metrics'
      redop:
        type: string
      root:
        type: integer
      size:
        type: integer
      type:
        type: string
    type: object
  backend.SysInfo:
    properties:
      cpuPercent:
        description: CPU使用率
        type: number
      loadAverage1:
        description: 1分钟内平均负载
        type: number
      loadAverage5:
        description: 5分钟平均负载
        type: number
      loadAverage15:
        description: 15分钟平均负载
        type: number
      memTotal:
        description: 总内存
        type: integer
      memUsage:
        description: 已使用内存
        type: integer
      memUsagePercent:
        description: 已使用内存百分比
        type: number
      swapTotal:
        description: 总swap
        type: integer
      swapUsage:
        description: 已使用swap
        type: integer
      swapUsagePercent:
        description: 已使用swap百分比
        type: number
    type: object
  web.RcclArgs:
    properties:
      args:
        items:
          type: string
        type: array
    type: object
  web.RestfulListResult-backend_DCULoad:
    properties:
      code:
        type: integer
      data:
        items:
          $ref: '#/definitions/backend.DCULoad'
        type: array
      msg:
        type: string
    type: object
  web.RestfulListResult-backend_LoginUserInfo:
    properties:
      code:
        type: integer
      data:
        items:
          $ref: '#/definitions/backend.LoginUserInfo'
        type: array
      msg:
        type: string
    type: object
  web.RestfulNoDataResult:
    properties:
      code:
        type: integer
      msg:
        type: string
    type: object
  web.RestfulResult-backend_AllInfo:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/backend.AllInfo'
      msg:
        type: string
    type: object
  web.RestfulResult-backend_RcclTestAllReducePrefResult:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/backend.RcclTestAllReducePrefResult'
      msg:
        type: string
    type: object
  web.RestfulResult-backend_SysInfo:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/backend.SysInfo'
      msg:
        type: string
    type: object
info:
  contact: {}
  description: 这是opsflow节点命令在服务模式下的接口文档
  title: OpsFlow API
  version: "1.0"
paths:
  /all:
    get:
      consumes:
      - application/json
      description: 获取所有信息(系统负载、DCU 负载、在线用户)
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/web.RestfulResult-backend_AllInfo'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/web.RestfulNoDataResult'
      summary: 获取所有信息(系统负载、DCU 负载、在线用户)
  /dcuload:
    get:
      consumes:
      - application/json
      description: 获取 DCU 负载信息
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/web.RestfulListResult-backend_DCULoad'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/web.RestfulNoDataResult'
      summary: 获取 DCU 负载信息
  /loginUser:
    get:
      consumes:
      - application/json
      description: 获取在线用户信息
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/web.RestfulListResult-backend_LoginUserInfo'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/web.RestfulNoDataResult'
      summary: 获取在线用户信息
  /rccl/post:
    post:
      consumes:
      - application/json
      description: 给出rccl all_reduce_perf参数,执行单机测试
      parameters:
      - description: rccl all reduce perf args
        in: body
        name: args
        required: true
        schema:
          $ref: '#/definitions/web.RcclArgs'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/web.RestfulResult-backend_RcclTestAllReducePrefResult'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/web.RestfulNoDataResult'
      summary: 给出rccl all_reduce_perf参数,执行单机测试
  /rcclinfo:
    get:
      consumes:
      - application/json
      description: 获取 rccl all_reduce_perf 性能信息
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/web.RestfulResult-backend_RcclTestAllReducePrefResult'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/web.RestfulNoDataResult'
      summary: 获取 rccl all_reduce_perf 性能信息
  /sysload:
    get:
      consumes:
      - application/json
      description: 获取系统负载信息
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/web.RestfulResult-backend_SysInfo'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/web.RestfulNoDataResult'
      summary: 获取系统负载信息
swagger: "2.0"