Files
remote-core/process/README.md
T
4566704 181150b7a1 docs: 补齐 common/file/process/shell 四个既有包的 README
- 每包定位/路由表/用法与注意事项(鉴权告诫、录制审计、防误杀语义)
- 至此 remote-core 全部包 README 覆盖
2026-09-20 12:50:55 +08:00

24 lines
894 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# process
远程进程管理(被控 HTTP 能力):进程列表 / 结束进程。gopsutil 跨平台实现,
与 file/shell 同为被控 HTTP 能力——BS 与客户机被控端共用,经 zonat 隧道 +
web-gateway 反代出网(typ=process,页面 www/process.html)。
## 路由
```go
import "git.zeroonesoft.cn/golib/remote-core/process"
process.RegisterRoutersProcess(r *gin.RouterGroup)
```
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | `/process/list` | 全量进程列表(`ProcItem`:pid/名称/用户/CPU/内存/启动时间/可执行路径/命令行),按内存占用降序 |
| POST | `/process/kill` | 结束进程,入参 `{pid, name?}` |
## 注意
- `kill` 带 `name` 时做防误杀校验:实际进程名与传入不符则拒绝(防 pid 复用)。
- Windows 上 gopsutil 权限不足时自动回退 `taskkill /F /T`(连子进程树强杀)。