service_status
Check a service's running state, PID, start time, and auto-start status on OpenWrt or systemd routers via SSH. Provide the service name to get instant status details or an error with sample services if not found.
Instructions
查询单个服务的运行状态、PID、启动时间与开机自启状态。
参数: name: 服务名(OpenWrt 为 /etc/init.d 脚本名,systemd 为 unit 名,如 sshd.service)
返回结构: {"ok": true, "data": {"service": {"name", "running", "enabled", "pid", "started_at", "description", "source"}, "checked_at", "init_system"}}
服务不存在时返回 ok=false,error.code = SERVICE_NOT_FOUND,并在 details 中给出可用服务样例。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |