Conghao97's picture tcftrees's picture
ProgramGen release
d086025
|
Raw History Blame Contribute Delete
1.98 kB

Systemd Service Configuration

Detailed guide for configuring and managing Guts nodes with systemd.

Service File

Basic Service

Production-Hardened Service

Service Management

Basic Commands

Viewing Logs

Checking Service Health

Multiple Instances

Run multiple Guts nodes on the same machine using template units:

Template Unit

Managing Instances

Socket Activation

For faster startup and better resource management:

Socket Unit

Socket-Activated Service

Resource Management with cgroups

CPU Limits

Memory Limits

I/O Limits

Combined Resource Slice

Environment Files

Using Environment File

Secure Credentials

Watchdog Integration

Enable Watchdog

Application Support

The application must periodically notify systemd:

Integration with Other Services

Dependency on Database

Start After Network

Ordering Multiple Services

Maintenance Operations

Scheduled Maintenance

Backup Timer

Debugging

Analyze Boot Time

Debug Mode

Common Issues

Security Verification

Verify Hardening

Audit Service Capabilities

Reference

Service States

State Description
active (running) Service is running
active (exited) Service ran and exited
inactive (dead) Service is stopped
failed Service failed to start
activating Service is starting
deactivating Service is stopping

Exit Codes

Code Description Restart Behavior
0 Success Restart=on-failure: No
1-255 Failure Restart=on-failure: Yes
SIGTERM Normal stop Restart=always: Yes
SIGKILL Force stop Restart=always: Yes

Next Steps