在环境执行 SSH 命令
envmgr_sshExecute shell commands on a specified environment via SSH to inspect logs, check processes, and view disk space, returning output directly.
Instructions
通过 SSH 在指定环境上执行 shell 命令,返回命令输出。
使用场景:
查看服务日志:tail -100 /data/logs/hillos-core/log-error.log
检查进程状态:ps aux | grep java
查看磁盘空间:df -h
统计日志错误:grep -c 'ERROR' /data/logs/xxx/log-error.log
注意:命令在 root 权限下执行,请谨慎使用破坏性命令。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | Yes | 环境名称,与 envmgr_list 返回的名称一致 | |
| command | Yes | 要执行的 shell 命令 | |
| timeout_seconds | No | 超时秒数,默认 30,最大 120 |