- update example based on '-ef' behavior
- new example specifying ps args 'aux'
- resolves #7205
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
| ... | ... |
@@ -269,40 +269,59 @@ Status Codes: |
| 269 | 269 |
|
| 270 | 270 |
`GET /containers/(id)/top` |
| 271 | 271 |
|
| 272 |
-List processes running inside the container `id` |
|
| 272 |
+List processes running inside the container `id`. On Unix systems this |
|
| 273 |
+is done by running the `ps` command. This endpoint is not |
|
| 274 |
+supported on Windows. |
|
| 273 | 275 |
|
| 274 | 276 |
**Example request**: |
| 275 | 277 |
|
| 276 |
- GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 278 |
+ GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 277 | 279 |
|
| 278 | 280 |
**Example response**: |
| 279 | 281 |
|
| 280 |
- HTTP/1.1 200 OK |
|
| 281 |
- Content-Type: application/json |
|
| 282 |
+ HTTP/1.1 200 OK |
|
| 283 |
+ Content-Type: application/json |
|
| 284 |
+ |
|
| 285 |
+ {
|
|
| 286 |
+ "Titles" : [ |
|
| 287 |
+ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" |
|
| 288 |
+ ], |
|
| 289 |
+ "Processes" : [ |
|
| 290 |
+ [ |
|
| 291 |
+ "root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash" |
|
| 292 |
+ ], |
|
| 293 |
+ [ |
|
| 294 |
+ "root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10" |
|
| 295 |
+ ] |
|
| 296 |
+ ] |
|
| 297 |
+ } |
|
| 282 | 298 |
|
| 283 |
- {
|
|
| 284 |
- "Titles": [ |
|
| 285 |
- "USER", |
|
| 286 |
- "PID", |
|
| 287 |
- "%CPU", |
|
| 288 |
- "%MEM", |
|
| 289 |
- "VSZ", |
|
| 290 |
- "RSS", |
|
| 291 |
- "TTY", |
|
| 292 |
- "STAT", |
|
| 293 |
- "START", |
|
| 294 |
- "TIME", |
|
| 295 |
- "COMMAND" |
|
| 296 |
- ], |
|
| 297 |
- "Processes": [ |
|
| 298 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 299 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 300 |
- ] |
|
| 301 |
- } |
|
| 299 |
+**Example request**: |
|
| 300 |
+ |
|
| 301 |
+ GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1 |
|
| 302 |
+ |
|
| 303 |
+**Example response**: |
|
| 304 |
+ |
|
| 305 |
+ HTTP/1.1 200 OK |
|
| 306 |
+ Content-Type: application/json |
|
| 307 |
+ |
|
| 308 |
+ {
|
|
| 309 |
+ "Titles" : [ |
|
| 310 |
+ "USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND" |
|
| 311 |
+ ] |
|
| 312 |
+ "Processes" : [ |
|
| 313 |
+ [ |
|
| 314 |
+ "root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash" |
|
| 315 |
+ ], |
|
| 316 |
+ [ |
|
| 317 |
+ "root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10" |
|
| 318 |
+ ] |
|
| 319 |
+ ], |
|
| 320 |
+ } |
|
| 302 | 321 |
|
| 303 | 322 |
Query Parameters: |
| 304 | 323 |
|
| 305 |
-- **ps_args** – ps arguments to use (e.g., aux) |
|
| 324 |
+- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef` |
|
| 306 | 325 |
|
| 307 | 326 |
Status Codes: |
| 308 | 327 |
|
| ... | ... |
@@ -357,40 +357,59 @@ Status Codes: |
| 357 | 357 |
|
| 358 | 358 |
`GET /containers/(id)/top` |
| 359 | 359 |
|
| 360 |
-List processes running inside the container `id` |
|
| 360 |
+List processes running inside the container `id`. On Unix systems this |
|
| 361 |
+is done by running the `ps` command. This endpoint is not |
|
| 362 |
+supported on Windows. |
|
| 361 | 363 |
|
| 362 | 364 |
**Example request**: |
| 363 | 365 |
|
| 364 |
- GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 366 |
+ GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 365 | 367 |
|
| 366 | 368 |
**Example response**: |
| 367 | 369 |
|
| 368 |
- HTTP/1.1 200 OK |
|
| 369 |
- Content-Type: application/json |
|
| 370 |
+ HTTP/1.1 200 OK |
|
| 371 |
+ Content-Type: application/json |
|
| 372 |
+ |
|
| 373 |
+ {
|
|
| 374 |
+ "Titles" : [ |
|
| 375 |
+ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" |
|
| 376 |
+ ], |
|
| 377 |
+ "Processes" : [ |
|
| 378 |
+ [ |
|
| 379 |
+ "root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash" |
|
| 380 |
+ ], |
|
| 381 |
+ [ |
|
| 382 |
+ "root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10" |
|
| 383 |
+ ] |
|
| 384 |
+ ] |
|
| 385 |
+ } |
|
| 370 | 386 |
|
| 371 |
- {
|
|
| 372 |
- "Titles": [ |
|
| 373 |
- "USER", |
|
| 374 |
- "PID", |
|
| 375 |
- "%CPU", |
|
| 376 |
- "%MEM", |
|
| 377 |
- "VSZ", |
|
| 378 |
- "RSS", |
|
| 379 |
- "TTY", |
|
| 380 |
- "STAT", |
|
| 381 |
- "START", |
|
| 382 |
- "TIME", |
|
| 383 |
- "COMMAND" |
|
| 384 |
- ], |
|
| 385 |
- "Processes": [ |
|
| 386 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 387 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 388 |
- ] |
|
| 389 |
- } |
|
| 387 |
+**Example request**: |
|
| 388 |
+ |
|
| 389 |
+ GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1 |
|
| 390 |
+ |
|
| 391 |
+**Example response**: |
|
| 392 |
+ |
|
| 393 |
+ HTTP/1.1 200 OK |
|
| 394 |
+ Content-Type: application/json |
|
| 395 |
+ |
|
| 396 |
+ {
|
|
| 397 |
+ "Titles" : [ |
|
| 398 |
+ "USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND" |
|
| 399 |
+ ] |
|
| 400 |
+ "Processes" : [ |
|
| 401 |
+ [ |
|
| 402 |
+ "root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash" |
|
| 403 |
+ ], |
|
| 404 |
+ [ |
|
| 405 |
+ "root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10" |
|
| 406 |
+ ] |
|
| 407 |
+ ], |
|
| 408 |
+ } |
|
| 390 | 409 |
|
| 391 | 410 |
Query Parameters: |
| 392 | 411 |
|
| 393 |
-- **ps_args** – ps arguments to use (e.g., aux) |
|
| 412 |
+- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef` |
|
| 394 | 413 |
|
| 395 | 414 |
Status Codes: |
| 396 | 415 |
|
| ... | ... |
@@ -357,40 +357,59 @@ Status Codes: |
| 357 | 357 |
|
| 358 | 358 |
`GET /containers/(id)/top` |
| 359 | 359 |
|
| 360 |
-List processes running inside the container `id` |
|
| 360 |
+List processes running inside the container `id`. On Unix systems this |
|
| 361 |
+is done by running the `ps` command. This endpoint is not |
|
| 362 |
+supported on Windows. |
|
| 361 | 363 |
|
| 362 | 364 |
**Example request**: |
| 363 | 365 |
|
| 364 |
- GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 366 |
+ GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 365 | 367 |
|
| 366 | 368 |
**Example response**: |
| 367 | 369 |
|
| 368 |
- HTTP/1.1 200 OK |
|
| 369 |
- Content-Type: application/json |
|
| 370 |
+ HTTP/1.1 200 OK |
|
| 371 |
+ Content-Type: application/json |
|
| 372 |
+ |
|
| 373 |
+ {
|
|
| 374 |
+ "Titles" : [ |
|
| 375 |
+ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" |
|
| 376 |
+ ], |
|
| 377 |
+ "Processes" : [ |
|
| 378 |
+ [ |
|
| 379 |
+ "root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash" |
|
| 380 |
+ ], |
|
| 381 |
+ [ |
|
| 382 |
+ "root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10" |
|
| 383 |
+ ] |
|
| 384 |
+ ] |
|
| 385 |
+ } |
|
| 370 | 386 |
|
| 371 |
- {
|
|
| 372 |
- "Titles": [ |
|
| 373 |
- "USER", |
|
| 374 |
- "PID", |
|
| 375 |
- "%CPU", |
|
| 376 |
- "%MEM", |
|
| 377 |
- "VSZ", |
|
| 378 |
- "RSS", |
|
| 379 |
- "TTY", |
|
| 380 |
- "STAT", |
|
| 381 |
- "START", |
|
| 382 |
- "TIME", |
|
| 383 |
- "COMMAND" |
|
| 384 |
- ], |
|
| 385 |
- "Processes": [ |
|
| 386 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 387 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 388 |
- ] |
|
| 389 |
- } |
|
| 387 |
+**Example request**: |
|
| 388 |
+ |
|
| 389 |
+ GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1 |
|
| 390 |
+ |
|
| 391 |
+**Example response**: |
|
| 392 |
+ |
|
| 393 |
+ HTTP/1.1 200 OK |
|
| 394 |
+ Content-Type: application/json |
|
| 395 |
+ |
|
| 396 |
+ {
|
|
| 397 |
+ "Titles" : [ |
|
| 398 |
+ "USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND" |
|
| 399 |
+ ] |
|
| 400 |
+ "Processes" : [ |
|
| 401 |
+ [ |
|
| 402 |
+ "root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash" |
|
| 403 |
+ ], |
|
| 404 |
+ [ |
|
| 405 |
+ "root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10" |
|
| 406 |
+ ] |
|
| 407 |
+ ], |
|
| 408 |
+ } |
|
| 390 | 409 |
|
| 391 | 410 |
Query Parameters: |
| 392 | 411 |
|
| 393 |
-- **ps_args** – ps arguments to use (e.g., aux) |
|
| 412 |
+- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef` |
|
| 394 | 413 |
|
| 395 | 414 |
Status Codes: |
| 396 | 415 |
|
| ... | ... |
@@ -396,40 +396,59 @@ Status Codes: |
| 396 | 396 |
|
| 397 | 397 |
`GET /containers/(id)/top` |
| 398 | 398 |
|
| 399 |
-List processes running inside the container `id` |
|
| 399 |
+List processes running inside the container `id`. On Unix systems this |
|
| 400 |
+is done by running the `ps` command. This endpoint is not |
|
| 401 |
+supported on Windows. |
|
| 400 | 402 |
|
| 401 | 403 |
**Example request**: |
| 402 | 404 |
|
| 403 |
- GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 405 |
+ GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 404 | 406 |
|
| 405 | 407 |
**Example response**: |
| 406 | 408 |
|
| 407 |
- HTTP/1.1 200 OK |
|
| 408 |
- Content-Type: application/json |
|
| 409 |
+ HTTP/1.1 200 OK |
|
| 410 |
+ Content-Type: application/json |
|
| 411 |
+ |
|
| 412 |
+ {
|
|
| 413 |
+ "Titles" : [ |
|
| 414 |
+ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" |
|
| 415 |
+ ], |
|
| 416 |
+ "Processes" : [ |
|
| 417 |
+ [ |
|
| 418 |
+ "root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash" |
|
| 419 |
+ ], |
|
| 420 |
+ [ |
|
| 421 |
+ "root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10" |
|
| 422 |
+ ] |
|
| 423 |
+ ] |
|
| 424 |
+ } |
|
| 409 | 425 |
|
| 410 |
- {
|
|
| 411 |
- "Titles": [ |
|
| 412 |
- "USER", |
|
| 413 |
- "PID", |
|
| 414 |
- "%CPU", |
|
| 415 |
- "%MEM", |
|
| 416 |
- "VSZ", |
|
| 417 |
- "RSS", |
|
| 418 |
- "TTY", |
|
| 419 |
- "STAT", |
|
| 420 |
- "START", |
|
| 421 |
- "TIME", |
|
| 422 |
- "COMMAND" |
|
| 423 |
- ], |
|
| 424 |
- "Processes": [ |
|
| 425 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 426 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 427 |
- ] |
|
| 428 |
- } |
|
| 426 |
+**Example request**: |
|
| 427 |
+ |
|
| 428 |
+ GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1 |
|
| 429 |
+ |
|
| 430 |
+**Example response**: |
|
| 431 |
+ |
|
| 432 |
+ HTTP/1.1 200 OK |
|
| 433 |
+ Content-Type: application/json |
|
| 434 |
+ |
|
| 435 |
+ {
|
|
| 436 |
+ "Titles" : [ |
|
| 437 |
+ "USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND" |
|
| 438 |
+ ] |
|
| 439 |
+ "Processes" : [ |
|
| 440 |
+ [ |
|
| 441 |
+ "root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash" |
|
| 442 |
+ ], |
|
| 443 |
+ [ |
|
| 444 |
+ "root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10" |
|
| 445 |
+ ] |
|
| 446 |
+ ], |
|
| 447 |
+ } |
|
| 429 | 448 |
|
| 430 | 449 |
Query Parameters: |
| 431 | 450 |
|
| 432 |
-- **ps_args** – ps arguments to use (e.g., aux) |
|
| 451 |
+- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef` |
|
| 433 | 452 |
|
| 434 | 453 |
Status Codes: |
| 435 | 454 |
|
| ... | ... |
@@ -434,40 +434,59 @@ Status Codes: |
| 434 | 434 |
|
| 435 | 435 |
`GET /containers/(id)/top` |
| 436 | 436 |
|
| 437 |
-List processes running inside the container `id` |
|
| 437 |
+List processes running inside the container `id`. On Unix systems this |
|
| 438 |
+is done by running the `ps` command. This endpoint is not |
|
| 439 |
+supported on Windows. |
|
| 438 | 440 |
|
| 439 | 441 |
**Example request**: |
| 440 | 442 |
|
| 441 |
- GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 443 |
+ GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 442 | 444 |
|
| 443 | 445 |
**Example response**: |
| 444 | 446 |
|
| 445 |
- HTTP/1.1 200 OK |
|
| 446 |
- Content-Type: application/json |
|
| 447 |
+ HTTP/1.1 200 OK |
|
| 448 |
+ Content-Type: application/json |
|
| 449 |
+ |
|
| 450 |
+ {
|
|
| 451 |
+ "Titles" : [ |
|
| 452 |
+ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" |
|
| 453 |
+ ], |
|
| 454 |
+ "Processes" : [ |
|
| 455 |
+ [ |
|
| 456 |
+ "root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash" |
|
| 457 |
+ ], |
|
| 458 |
+ [ |
|
| 459 |
+ "root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10" |
|
| 460 |
+ ] |
|
| 461 |
+ ] |
|
| 462 |
+ } |
|
| 447 | 463 |
|
| 448 |
- {
|
|
| 449 |
- "Titles": [ |
|
| 450 |
- "USER", |
|
| 451 |
- "PID", |
|
| 452 |
- "%CPU", |
|
| 453 |
- "%MEM", |
|
| 454 |
- "VSZ", |
|
| 455 |
- "RSS", |
|
| 456 |
- "TTY", |
|
| 457 |
- "STAT", |
|
| 458 |
- "START", |
|
| 459 |
- "TIME", |
|
| 460 |
- "COMMAND" |
|
| 461 |
- ], |
|
| 462 |
- "Processes": [ |
|
| 463 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 464 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 465 |
- ] |
|
| 466 |
- } |
|
| 464 |
+**Example request**: |
|
| 465 |
+ |
|
| 466 |
+ GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1 |
|
| 467 |
+ |
|
| 468 |
+**Example response**: |
|
| 469 |
+ |
|
| 470 |
+ HTTP/1.1 200 OK |
|
| 471 |
+ Content-Type: application/json |
|
| 472 |
+ |
|
| 473 |
+ {
|
|
| 474 |
+ "Titles" : [ |
|
| 475 |
+ "USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND" |
|
| 476 |
+ ] |
|
| 477 |
+ "Processes" : [ |
|
| 478 |
+ [ |
|
| 479 |
+ "root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash" |
|
| 480 |
+ ], |
|
| 481 |
+ [ |
|
| 482 |
+ "root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10" |
|
| 483 |
+ ] |
|
| 484 |
+ ], |
|
| 485 |
+ } |
|
| 467 | 486 |
|
| 468 | 487 |
Query Parameters: |
| 469 | 488 |
|
| 470 |
-- **ps_args** – ps arguments to use (e.g., aux) |
|
| 489 |
+- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef` |
|
| 471 | 490 |
|
| 472 | 491 |
Status Codes: |
| 473 | 492 |
|
| ... | ... |
@@ -449,7 +449,9 @@ Status Codes: |
| 449 | 449 |
|
| 450 | 450 |
`GET /containers/(id)/top` |
| 451 | 451 |
|
| 452 |
-List processes running inside the container `id` |
|
| 452 |
+List processes running inside the container `id`. On Unix systems this |
|
| 453 |
+is done by running the `ps` command. This endpoint is not |
|
| 454 |
+supported on Windows. |
|
| 453 | 455 |
|
| 454 | 456 |
**Example request**: |
| 455 | 457 |
|
| ... | ... |
@@ -461,28 +463,45 @@ List processes running inside the container `id` |
| 461 | 461 |
Content-Type: application/json |
| 462 | 462 |
|
| 463 | 463 |
{
|
| 464 |
- "Titles": [ |
|
| 465 |
- "USER", |
|
| 466 |
- "PID", |
|
| 467 |
- "%CPU", |
|
| 468 |
- "%MEM", |
|
| 469 |
- "VSZ", |
|
| 470 |
- "RSS", |
|
| 471 |
- "TTY", |
|
| 472 |
- "STAT", |
|
| 473 |
- "START", |
|
| 474 |
- "TIME", |
|
| 475 |
- "COMMAND" |
|
| 476 |
- ], |
|
| 477 |
- "Processes": [ |
|
| 478 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 479 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 464 |
+ "Titles" : [ |
|
| 465 |
+ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" |
|
| 466 |
+ ], |
|
| 467 |
+ "Processes" : [ |
|
| 468 |
+ [ |
|
| 469 |
+ "root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash" |
|
| 470 |
+ ], |
|
| 471 |
+ [ |
|
| 472 |
+ "root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10" |
|
| 480 | 473 |
] |
| 474 |
+ ] |
|
| 475 |
+ } |
|
| 476 |
+ |
|
| 477 |
+**Example request**: |
|
| 478 |
+ |
|
| 479 |
+ GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1 |
|
| 480 |
+ |
|
| 481 |
+**Example response**: |
|
| 482 |
+ |
|
| 483 |
+ HTTP/1.1 200 OK |
|
| 484 |
+ Content-Type: application/json |
|
| 485 |
+ |
|
| 486 |
+ {
|
|
| 487 |
+ "Titles" : [ |
|
| 488 |
+ "USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND" |
|
| 489 |
+ ] |
|
| 490 |
+ "Processes" : [ |
|
| 491 |
+ [ |
|
| 492 |
+ "root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash" |
|
| 493 |
+ ], |
|
| 494 |
+ [ |
|
| 495 |
+ "root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10" |
|
| 496 |
+ ] |
|
| 497 |
+ ], |
|
| 481 | 498 |
} |
| 482 | 499 |
|
| 483 | 500 |
Query Parameters: |
| 484 | 501 |
|
| 485 |
-- **ps_args** – ps arguments to use (e.g., aux) |
|
| 502 |
+- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef` |
|
| 486 | 503 |
|
| 487 | 504 |
Status Codes: |
| 488 | 505 |
|
| ... | ... |
@@ -460,7 +460,9 @@ Status Codes: |
| 460 | 460 |
|
| 461 | 461 |
`GET /containers/(id)/top` |
| 462 | 462 |
|
| 463 |
-List processes running inside the container `id` |
|
| 463 |
+List processes running inside the container `id`. On Unix systems this |
|
| 464 |
+is done by running the `ps` command. This endpoint is not |
|
| 465 |
+supported on Windows. |
|
| 464 | 466 |
|
| 465 | 467 |
**Example request**: |
| 466 | 468 |
|
| ... | ... |
@@ -472,28 +474,45 @@ List processes running inside the container `id` |
| 472 | 472 |
Content-Type: application/json |
| 473 | 473 |
|
| 474 | 474 |
{
|
| 475 |
- "Titles": [ |
|
| 476 |
- "USER", |
|
| 477 |
- "PID", |
|
| 478 |
- "%CPU", |
|
| 479 |
- "%MEM", |
|
| 480 |
- "VSZ", |
|
| 481 |
- "RSS", |
|
| 482 |
- "TTY", |
|
| 483 |
- "STAT", |
|
| 484 |
- "START", |
|
| 485 |
- "TIME", |
|
| 486 |
- "COMMAND" |
|
| 487 |
- ], |
|
| 488 |
- "Processes": [ |
|
| 489 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 490 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 475 |
+ "Titles" : [ |
|
| 476 |
+ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" |
|
| 477 |
+ ], |
|
| 478 |
+ "Processes" : [ |
|
| 479 |
+ [ |
|
| 480 |
+ "root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash" |
|
| 481 |
+ ], |
|
| 482 |
+ [ |
|
| 483 |
+ "root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10" |
|
| 491 | 484 |
] |
| 485 |
+ ] |
|
| 486 |
+ } |
|
| 487 |
+ |
|
| 488 |
+**Example request**: |
|
| 489 |
+ |
|
| 490 |
+ GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1 |
|
| 491 |
+ |
|
| 492 |
+**Example response**: |
|
| 493 |
+ |
|
| 494 |
+ HTTP/1.1 200 OK |
|
| 495 |
+ Content-Type: application/json |
|
| 496 |
+ |
|
| 497 |
+ {
|
|
| 498 |
+ "Titles" : [ |
|
| 499 |
+ "USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND" |
|
| 500 |
+ ] |
|
| 501 |
+ "Processes" : [ |
|
| 502 |
+ [ |
|
| 503 |
+ "root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash" |
|
| 504 |
+ ], |
|
| 505 |
+ [ |
|
| 506 |
+ "root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10" |
|
| 507 |
+ ] |
|
| 508 |
+ ], |
|
| 492 | 509 |
} |
| 493 | 510 |
|
| 494 | 511 |
Query Parameters: |
| 495 | 512 |
|
| 496 |
-- **ps_args** – ps arguments to use (e.g., aux) |
|
| 513 |
+- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef` |
|
| 497 | 514 |
|
| 498 | 515 |
Status Codes: |
| 499 | 516 |
|
| ... | ... |
@@ -525,7 +525,9 @@ Status Codes: |
| 525 | 525 |
|
| 526 | 526 |
`GET /containers/(id)/top` |
| 527 | 527 |
|
| 528 |
-List processes running inside the container `id` |
|
| 528 |
+List processes running inside the container `id`. On Unix systems this |
|
| 529 |
+is done by running the `ps` command. This endpoint is not |
|
| 530 |
+supported on Windows. |
|
| 529 | 531 |
|
| 530 | 532 |
**Example request**: |
| 531 | 533 |
|
| ... | ... |
@@ -537,28 +539,45 @@ List processes running inside the container `id` |
| 537 | 537 |
Content-Type: application/json |
| 538 | 538 |
|
| 539 | 539 |
{
|
| 540 |
- "Titles": [ |
|
| 541 |
- "USER", |
|
| 542 |
- "PID", |
|
| 543 |
- "%CPU", |
|
| 544 |
- "%MEM", |
|
| 545 |
- "VSZ", |
|
| 546 |
- "RSS", |
|
| 547 |
- "TTY", |
|
| 548 |
- "STAT", |
|
| 549 |
- "START", |
|
| 550 |
- "TIME", |
|
| 551 |
- "COMMAND" |
|
| 552 |
- ], |
|
| 553 |
- "Processes": [ |
|
| 554 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 555 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 540 |
+ "Titles" : [ |
|
| 541 |
+ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" |
|
| 542 |
+ ], |
|
| 543 |
+ "Processes" : [ |
|
| 544 |
+ [ |
|
| 545 |
+ "root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash" |
|
| 546 |
+ ], |
|
| 547 |
+ [ |
|
| 548 |
+ "root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10" |
|
| 556 | 549 |
] |
| 550 |
+ ] |
|
| 551 |
+ } |
|
| 552 |
+ |
|
| 553 |
+**Example request**: |
|
| 554 |
+ |
|
| 555 |
+ GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1 |
|
| 556 |
+ |
|
| 557 |
+**Example response**: |
|
| 558 |
+ |
|
| 559 |
+ HTTP/1.1 200 OK |
|
| 560 |
+ Content-Type: application/json |
|
| 561 |
+ |
|
| 562 |
+ {
|
|
| 563 |
+ "Titles" : [ |
|
| 564 |
+ "USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND" |
|
| 565 |
+ ] |
|
| 566 |
+ "Processes" : [ |
|
| 567 |
+ [ |
|
| 568 |
+ "root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash" |
|
| 569 |
+ ], |
|
| 570 |
+ [ |
|
| 571 |
+ "root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10" |
|
| 572 |
+ ] |
|
| 573 |
+ ], |
|
| 557 | 574 |
} |
| 558 | 575 |
|
| 559 | 576 |
Query Parameters: |
| 560 | 577 |
|
| 561 |
-- **ps_args** – ps arguments to use (e.g., aux) |
|
| 578 |
+- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef` |
|
| 562 | 579 |
|
| 563 | 580 |
Status Codes: |
| 564 | 581 |
|
| ... | ... |
@@ -530,7 +530,9 @@ Status Codes: |
| 530 | 530 |
|
| 531 | 531 |
`GET /containers/(id)/top` |
| 532 | 532 |
|
| 533 |
-List processes running inside the container `id` |
|
| 533 |
+List processes running inside the container `id`. On Unix systems this |
|
| 534 |
+is done by running the `ps` command. This endpoint is not |
|
| 535 |
+supported on Windows. |
|
| 534 | 536 |
|
| 535 | 537 |
**Example request**: |
| 536 | 538 |
|
| ... | ... |
@@ -542,28 +544,45 @@ List processes running inside the container `id` |
| 542 | 542 |
Content-Type: application/json |
| 543 | 543 |
|
| 544 | 544 |
{
|
| 545 |
- "Titles": [ |
|
| 546 |
- "USER", |
|
| 547 |
- "PID", |
|
| 548 |
- "%CPU", |
|
| 549 |
- "%MEM", |
|
| 550 |
- "VSZ", |
|
| 551 |
- "RSS", |
|
| 552 |
- "TTY", |
|
| 553 |
- "STAT", |
|
| 554 |
- "START", |
|
| 555 |
- "TIME", |
|
| 556 |
- "COMMAND" |
|
| 557 |
- ], |
|
| 558 |
- "Processes": [ |
|
| 559 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 560 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 545 |
+ "Titles" : [ |
|
| 546 |
+ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" |
|
| 547 |
+ ], |
|
| 548 |
+ "Processes" : [ |
|
| 549 |
+ [ |
|
| 550 |
+ "root", "13642", "882", "0", "17:03", "pts/0", "00:00:00", "/bin/bash" |
|
| 551 |
+ ], |
|
| 552 |
+ [ |
|
| 553 |
+ "root", "13735", "13642", "0", "17:06", "pts/0", "00:00:00", "sleep 10" |
|
| 561 | 554 |
] |
| 555 |
+ ] |
|
| 556 |
+ } |
|
| 557 |
+ |
|
| 558 |
+**Example request**: |
|
| 559 |
+ |
|
| 560 |
+ GET /containers/4fa6e0f0c678/top?ps_args=aux HTTP/1.1 |
|
| 561 |
+ |
|
| 562 |
+**Example response**: |
|
| 563 |
+ |
|
| 564 |
+ HTTP/1.1 200 OK |
|
| 565 |
+ Content-Type: application/json |
|
| 566 |
+ |
|
| 567 |
+ {
|
|
| 568 |
+ "Titles" : [ |
|
| 569 |
+ "USER","PID","%CPU","%MEM","VSZ","RSS","TTY","STAT","START","TIME","COMMAND" |
|
| 570 |
+ ] |
|
| 571 |
+ "Processes" : [ |
|
| 572 |
+ [ |
|
| 573 |
+ "root","13642","0.0","0.1","18172","3184","pts/0","Ss","17:03","0:00","/bin/bash" |
|
| 574 |
+ ], |
|
| 575 |
+ [ |
|
| 576 |
+ "root","13895","0.0","0.0","4348","692","pts/0","S+","17:15","0:00","sleep 10" |
|
| 577 |
+ ] |
|
| 578 |
+ ], |
|
| 562 | 579 |
} |
| 563 | 580 |
|
| 564 | 581 |
Query Parameters: |
| 565 | 582 |
|
| 566 |
-- **ps_args** – ps arguments to use (e.g., aux) |
|
| 583 |
+- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef` |
|
| 567 | 584 |
|
| 568 | 585 |
Status Codes: |
| 569 | 586 |
|