Linux systemd: スライスを削除する

Linux systemd: スライスを削除する

興味深いのですが、作成した systemd スライスを削除する方法はありますか? 私は systemd-238-9 とカーネル 4.17.12-200.fc28.x86_64 を搭載した Fedora 28 を実行しています。

私が実行したのは:

systemd-run --unit=toptest --slice=test top -b

そして、終了した後top、スライスが表示されます。

systemctl -t slice --all

しかし、削除できません。試してみました

systemctl stop test.slice
systemctl kill test.slice
systemctl unload test.slice

(後者は「不明な操作」を返します)、それでも私のスライスはそのリストに残ります。

ありがとう。

答え1

私の FC28 システムでは、コマンドの後にテスト スライスが消えますsystemctl stop test.slice。その後に kill を試行すると、次の結果が得られます。

systemctl kill  test.slice
Failed to kill unit test.slice: Unit test.slice not loaded.

関連情報