linux-systemd

Installation
SKILL.md

linux-systemd

Purpose

This skill provides tools for managing systemd on Linux, focusing on service units, system control, logging, and integration features like cgroups and socket activation, specifically for OpenClaw service management.

When to Use

Use this skill when you need to automate Linux service operations, such as starting/stopping daemons, monitoring logs, or optimizing resource usage with cgroups. Apply it in scripts for system administration, container orchestration, or when integrating OpenClaw as a systemd service. Avoid it on non-systemd systems like BSD or custom init setups.

Key Capabilities

  • Manage systemd unit files for services, sockets, and timers, including editing files in /etc/systemd/system/.
  • Control services via systemctl commands, such as starting, stopping, and restarting units.
  • Query logs with journalctl for real-time or historical output from specific units.
  • Integrate cgroups for resource limits, e.g., CPU/memory constraints on services.
  • Enable socket activation for on-demand service starts, reducing resource overhead.
  • Handle OpenClaw as a systemd service by creating a unit file with ExecStart pointing to the OpenClaw binary.

Usage Patterns

Always run commands with elevated privileges using sudo or as root. In scripts, use subprocess calls in Python or shell exec in Bash to invoke systemctl/journalctl. For unit file creation, edit files directly or use systemd-analyze for validation. When integrating with OpenClaw, ensure the service unit references the correct binary path and environment variables. Structure patterns as: detect service state first, then perform actions, and log outputs. For cgroups, specify limits in the unit file's [Service] section before reloading systemd.

Related skills
Installs
23
GitHub Stars
5
First Seen
Mar 7, 2026