Service Tools¶
services ¶
Service management tools.
get_service_logs
async
¶
get_service_logs(
service_name: Annotated[str, "Name of the service"],
lines: Annotated[
int,
Field(
description="Number of log lines to retrieve.",
ge=1,
le=10000,
),
] = 50,
host: Host = None,
) -> str
Get recent logs for a specific systemd service.
Retrieves journal entries for the specified service unit, including timestamps, priority levels, and log messages.
Source code in src/linux_mcp_server/tools/services.py
get_service_status
async
¶
get_service_status(
service_name: Annotated[str, "Name of the service"],
host: Host = None,
) -> str
Get status of a specific systemd service.
Retrieves detailed service information including active/enabled state, main PID, memory usage, CPU time, and recent log entries from the journal.
Source code in src/linux_mcp_server/tools/services.py
list_services
async
¶
List all systemd services.
Retrieves all systemd service units with their load state, active state, sub-state, and description. Also includes a count of currently running services.