我正在编写一个脚本来准备我的 Linux 系统进行基准测试。除其他事项外,我想停止所有 systemd 计时器单元,然后恢复此操作。
简而言之,我需要相当于 service crond stop/start.
service crond stop/start
到目前为止我所发现的只是systemctl list-timers然后手动停止每个,然后手动启动每个。你知道任何更好、更通用的解决方案吗?
systemctl list-timers
systemd systemd-timer
systemd ×1
systemd-timer ×1