(1) 修复 cargo doc, cargo test 编译警告 (2) SCM 自动重启 pm-sysd-init, soft-reboot, exit 集成修复 (3) conf 模块优化 pub const (4) SCM 集成优化, 状态上报 (5) p_w 使用 taskkill 尝试终止进程 (6) i18n locales 优化 (7) ro pm-sysd-log –query 超时, pm-sysd-init 整体退出超时 (8) LogD 运行时更新配置, LogUnit 运行时更新配置, LogUnit 生命周期管理 (9) sysd 模块 重构/优化, BUG 修复
https://github.com/fm-elpac/pm-sysd-w
胖喵稳哒.
Systemd style on Windows.
本项目使用 AI (kimi, deepseek) 辅助制作. This project is made with the assistance of AI (kimi, deepseek).
本项目使用 AI (kimi, deepseek) 辅助制作.
This project is made with the assistance of AI (kimi, deepseek).
pm-sysd-w 模仿 systemd 的风格和使用体验, 在 Windows 上管理进程 (process). 并不 兼容 systemd, 只实现 systemd 的一小部分功能 (subset). 配置文件采用 pm-tc 的集中式 toml 格式.
pm-sysd-w mimics the style and user experience of systemd, managing processes on Windows. It is not systemd-compatible and implements only a small subset of systemd. Configuration uses pm-tc’s centralized TOML format.
镜像 (mirror):
比如, 配置文件 test.conf.toml:
test.conf.toml
For example, a config file test.conf.toml:
pm_tc = 1 [[t.sysd]] "env:Unit" = "test-ping.service" "env:Unit.Description" = "Ping 127.0.0.1 test" "env:Service.ExecStart" = "ping 127.0.0.1" "env:Service.Restart" = "always" "env:Service.RestartSec" = "20" "env:Install.WantedBy" = "default.target"
ping.exe 默认 4 次后退出, 配合 Restart=always 即每 20 秒开始 ping.
ping.exe
Restart=always
ping.exe exits after 4 pings by default, so with Restart=always it starts a ping every 20 seconds.
首先, 启动用户级实例 (守护进程):
First, start a user instance (the daemon):
pm-sysd-init.exe --user --conf=test.conf.toml
启动服务, 查看状态, 停止服务:
Start the service, show its status, and stop it:
pm-sysd-ctl --user start test-ping pm-sysd-ctl --user status test-ping pm-sysd-ctl --user stop test-ping
在 pm-sysd-init 启动后, 自动启动服务:
pm-sysd-init
After pm-sysd-init starts, the service starts automatically:
pm-sysd-ctl --user enable test-ping
查看日志:
View logs:
pm-sysd-log --user -eu test-ping.service
退出用户实例:
Exit the user instance:
pm-sysd-ctl --user exit
编译后运行, 查看命令行帮助.
Build and run to show the CLI help.
cargo build --release --features cli_init cargo build --release --features cli_ctl cargo build --release --features cli_log ./target/release/pm-sysd-ctl --help
用户文档见 doc/user/(中文). 开发文档见 doc/dev/(中文). 以中文文档为准.
doc/user/
doc/dev/
User docs are in doc/user_en/ (English translation). Development docs are in doc/dev_en/ (English translation). The Chinese docs are authoritative.
doc/user_en/
doc/dev_en/
MIT
胖喵稳哒: Systemd style on Windows.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
pm-sysd-w
https://github.com/fm-elpac/pm-sysd-w
胖喵稳哒.
Systemd style on Windows.
pm-sysd-w 模仿 systemd 的风格和使用体验, 在 Windows 上管理进程 (process). 并不 兼容 systemd, 只实现 systemd 的一小部分功能 (subset). 配置文件采用 pm-tc 的集中式 toml 格式.
pm-sysd-w mimics the style and user experience of systemd, managing processes on Windows. It is not systemd-compatible and implements only a small subset of systemd. Configuration uses pm-tc’s centralized TOML format.
镜像 (mirror):
举栗 Example
比如, 配置文件
test.conf.toml:For example, a config file
test.conf.toml:ping.exe默认 4 次后退出, 配合Restart=always即每 20 秒开始 ping.ping.exeexits after 4 pings by default, so withRestart=alwaysit starts a ping every 20 seconds.首先, 启动用户级实例 (守护进程):
First, start a user instance (the daemon):
启动服务, 查看状态, 停止服务:
Start the service, show its status, and stop it:
在
pm-sysd-init启动后, 自动启动服务:After
pm-sysd-initstarts, the service starts automatically:查看日志:
View logs:
退出用户实例:
Exit the user instance:
快速开始 Quick Start
编译后运行, 查看命令行帮助.
Build and run to show the CLI help.
文档 Documentation
用户文档见
doc/user/(中文). 开发文档见doc/dev/(中文). 以中文文档为准.User docs are in
doc/user_en/(English translation). Development docs are indoc/dev_en/(English translation). The Chinese docs are authoritative.LICENSE
MIT