-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fea94d9
commit 26af9aa
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Command | ||
description: Executing commands on multiple machines via SSH | ||
keywords: [ssh, command, execute] | ||
authors: [leo220yuyaodog] | ||
--- | ||
|
||
## Overview | ||
|
||
Casvisor provides a command feature that allows you to execute commands on multiple machines via SSH. This feature is | ||
useful for managing multiple machines at the same time. You can execute commands on multiple machines at the same time, | ||
and the results will be displayed in the web UI. Casvisor also exposes API for executing commands. | ||
|
||
![command](/img/command/command.png) | ||
|
||
## Usage | ||
|
||
1. Click the `add` button in the command list page to add a new command. | ||
2. Input the command in the command input box, if you want to execute multiple commands, you can input commands in multiple lines. | ||
3. Select the assets of SSH protocol that you want to execute the command on. | ||
4. Click the `Run All` button to execute the command on all selected assets. Or click the `Run` button to execute the command on a single asset. | ||
|
||
## API | ||
|
||
Casvisor provides an API for executing commands. The API is as follows: | ||
|
||
```shell | ||
Get /api/get-exec-output | ||
Params: | ||
- id: The id ( owner/name ) of the command | ||
``` | ||
|
||
Response: | ||
|
||
```json | ||
{ | ||
"code": 200, | ||
"msg": "success", | ||
"data": { | ||
"<asset name1>": "output", | ||
"<asset name2>": "output" | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.