Services Command β
The services
command provides comprehensive management of all 19 services in your media automation stack, including health monitoring, log access, API synchronization, and individual service control.
Usage β
bash
usenet services <action> [service...] [options]
Actions β
Action | Description | Example |
---|---|---|
list | Show status of all services | usenet services list |
start | Start services | usenet services start sonarr radarr |
stop | Stop services | usenet services stop jellyfin |
restart | Restart services | usenet services restart --all |
logs | View service logs | usenet services logs sonarr --follow |
health | Check service health | usenet services health --detailed |
sync | Synchronize service APIs | usenet services sync --storage |
Service Overview β
All Available Services β
bash
usenet services list
Example output:
bash
π SERVICES STATUS (19 total)
π¬ Media Services:
β
jellyfin (8096) β Media streaming with GPU transcoding
β
overseerr (5055) β Request management interface
β
yacreader (8082) β Comic/manga server
β
tdarr (8265) β Automated transcoding (GPU enabled)
π€ Automation Stack:
β
sonarr (8989) β TV automation (TRaSH Guide optimized)
β
radarr (7878) β Movie automation (custom formats)
β
readarr (8787) β Book/audiobook automation
β
bazarr (6767) β Subtitle automation (40+ languages)
β
prowlarr (9696) β Universal indexer management
β
recyclarr ------ β TRaSH Guide auto-optimization
β
mylar (8090) β Comic book automation
β
whisparr (6969) β Adult content automation
π₯ Download Clients:
β
sabnzbd (8080) β High-speed Usenet downloader
β
transmission (9092) β BitTorrent client
π§ Management & Monitoring:
β
portainer (9000) β Docker container management
β
netdata (19999) β Real-time system monitoring
β
jackett (9117) β Legacy indexer proxy
π Network Services:
β
samba (445) β Windows file sharing
β
nfs-server (2049) β Unix/Linux file sharing
Legend: β
Running β Warning β Stopped π Starting π Monitoring
Service Categories β
Category | Services | Purpose |
---|---|---|
Media | jellyfin, overseerr, yacreader, tdarr | Streaming and transcoding |
Automation | sonarr, radarr, readarr, bazarr, prowlarr, recyclarr, mylar, whisparr | Content automation |
Downloads | sabnzbd, transmission | Download clients |
Management | portainer, netdata, jackett | System management |
Network | samba, nfs-server | File sharing |
Service Management β
Starting Services β
bash
# Start all services
usenet services start --all
# Start specific services
usenet services start sonarr radarr jellyfin
# Start by category
usenet services start --category media
# Start with dependency resolution
usenet services start jellyfin --with-deps
Stopping Services β
bash
# Stop all services
usenet services stop --all
# Stop specific services
usenet services stop tdarr --graceful
# Stop by category
usenet services stop --category downloads
# Emergency stop (force kill)
usenet services stop jellyfin --force
Restarting Services β
bash
# Restart all services
usenet services restart --all
# Restart specific services
usenet services restart sonarr radarr
# Rolling restart (one at a time)
usenet services restart --rolling --category automation
# Restart with health check
usenet services restart jellyfin --wait-healthy
Health Monitoring β
Service Health Checks β
bash
usenet services health
Example health report:
bash
π₯ SERVICE HEALTH REPORT
β
Healthy Services (17/19):
β’ jellyfin: Responding, GPU transcoding active
β’ sonarr: API accessible, 3 root folders configured
β’ radarr: API accessible, quality profiles loaded
β’ prowlarr: 12 indexers operational
β’ sabnzbd: Queue processing, 45MB/s average speed
... (12 more healthy services)
β οΈ Warning Services (2/19):
β’ bazarr: API responding slowly (>2s response time)
ββ Recommendation: Check subtitle provider connections
β’ transmission: High memory usage (>1GB)
ββ Recommendation: Restart service or increase memory limit
β Failed Services (0/19):
(All services operational)
π Overall Health Score: 94% (Excellent)
π§ Recommendations:
β’ Monitor bazarr performance
β’ Consider restarting transmission during low-usage period
β’ All critical services operational
Detailed Health Checks β
bash
# Detailed health with API tests
usenet services health --detailed
# Test specific service APIs
usenet services health sonarr --test-api
# Health monitoring with alerts
usenet services health --monitor --alert-threshold 80
Log Management β
Viewing Logs β
bash
# View recent logs for service
usenet services logs sonarr
# Follow logs in real-time
usenet services logs jellyfin --follow
# View logs with timestamps
usenet services logs radarr --timestamps
# View logs from specific time
usenet services logs tdarr --since "1 hour ago"
Log Filtering β
bash
# Filter by log level
usenet services logs sonarr --level error
# Search logs for patterns
usenet services logs jellyfin --grep "transcode"
# View last N lines
usenet services logs prowlarr --tail 100
# Multiple services logs
usenet services logs sonarr radarr --merge
Log Export β
bash
# Export logs to file
usenet services logs --all --export logs-$(date +%Y%m%d).tar.gz
# Export specific service logs
usenet services logs jellyfin --export jellyfin-debug.log
# Export with metadata
usenet services logs --all --export --include-metadata
API Synchronization β
Storage Synchronization β
bash
# Sync all services with current storage
usenet services sync --storage
# Sync specific services
usenet services sync sonarr radarr --storage
# Dry run sync (show what would change)
usenet services sync --storage --dry-run
Example storage sync:
bash
π SYNCHRONIZING STORAGE WITH SERVICES
π Current Storage Pool:
β’ /media/external_4tb β /media/storage1 (4TB)
β’ /mnt/nas_media β /media/storage2 (8TB)
π§ Updating Service APIs:
β
Sonarr (localhost:8989):
β’ Added root folder: /media/storage1/tv
β’ Added root folder: /media/storage2/tv-archive
β’ Updated 3 existing series paths
β
Radarr (localhost:7878):
β’ Added root folder: /media/storage1/movies
β’ Added root folder: /media/storage2/movies-archive
β’ Updated 5 existing movie paths
β
Readarr (localhost:8787):
β’ Added root folder: /media/storage1/books
β’ Added root folder: /media/storage2/audiobooks
β
Jellyfin (localhost:8096):
β’ Updated library: "Movies" β /media/storage1/movies
β’ Updated library: "TV Shows" β /media/storage1/tv
β’ Added library: "Archive Movies" β /media/storage2/movies-archive
β’ Triggered library scan
β
Tdarr (localhost:8265):
β’ Updated input paths: [/media/storage1, /media/storage2]
β’ Updated output paths: [/media/storage1/transcoded]
β’ Refreshed worker nodes
π Sync Summary:
β’ Services updated: 5/5
β’ Root folders added: 8
β’ Libraries updated: 4
β’ API calls: 23 successful, 0 failed
Quality Profile Synchronization β
bash
# Sync TRaSH Guide profiles
usenet services sync --quality-profiles
# Update indexers across services
usenet services sync --indexers
# Sync custom formats
usenet services sync --custom-formats
Service Configuration β
Configuration Management β
bash
# Show service configuration
usenet services config sonarr
# Edit service configuration
usenet services config jellyfin --edit
# Reset service to defaults
usenet services config radarr --reset
# Backup service configurations
usenet services config --backup-all
Environment Variables β
bash
# Show service environment
usenet services env jellyfin
# Update environment variable
usenet services env sonarr --set SONARR_API_KEY=newkey
# Reload environment
usenet services env --reload-all
Performance Monitoring β
Resource Usage β
bash
# Show resource usage for all services
usenet services stats
# Monitor specific service
usenet services stats jellyfin --live
# Resource usage over time
usenet services stats --historical --since "24 hours ago"
Example stats output:
bash
π SERVICE RESOURCE USAGE
High Resource Usage:
π₯ jellyfin: CPU: 45% RAM: 2.1GB GPU: 23%
ββ Active transcodes: 2 streams (4Kβ1080p)
π₯ tdarr: CPU: 67% RAM: 1.8GB GPU: 15%
ββ Processing: movie_file.mkv (HEVCβAV1)
Medium Resource Usage:
π‘ sonarr: CPU: 8% RAM: 456MB
π‘ radarr: CPU: 12% RAM: 623MB
π‘ prowlarr: CPU: 5% RAM: 234MB
Low Resource Usage:
π’ overseerr: CPU: 2% RAM: 145MB
π’ bazarr: CPU: 1% RAM: 89MB
... (12 more services)
π Overall System:
β’ CPU: 15.2% average (24 cores)
β’ RAM: 8.3GB / 30GB (28%)
β’ GPU: 38% utilization
β’ Disk I/O: 45MB/s read, 23MB/s write
Performance Optimization β
bash
# Optimize service performance
usenet services optimize --auto
# Set resource limits
usenet services limit jellyfin --memory 4GB --cpu 2
# Scale services based on load
usenet services scale tdarr --workers 4
Troubleshooting β
Service Diagnostics β
bash
# Run diagnostics on all services
usenet services diagnose
# Diagnose specific service
usenet services diagnose jellyfin --verbose
# Test network connectivity
usenet services test-network
# Validate configurations
usenet services validate-config
Common Issues Resolution β
bash
# Fix common issues automatically
usenet services fix --auto
# Reset stuck service
usenet services reset sonarr
# Clear service caches
usenet services clear-cache --all
# Rebuild service configurations
usenet services rebuild radarr
Advanced Features β
Service Dependencies β
bash
# Show service dependencies
usenet services deps jellyfin
# Start with dependency chain
usenet services start jellyfin --with-deps
# Check dependency health
usenet services health --check-deps
Service Scaling β
bash
# Scale horizontally scalable services
usenet services scale tdarr-node --replicas 3
# Load balance across nodes
usenet services balance --auto
# Show scaling status
usenet services scale --status
Custom Service Management β
bash
# Add custom service
usenet services add --name custom-app \
--image myapp:latest \
--port 8080 \
--category custom
# Import external service
usenet services import docker-compose.custom.yml
# Remove service
usenet services remove custom-app
Examples β
bash
# Check overall health
usenet services health
# View any service issues
usenet services logs --level error --since "1 hour ago"
# Restart problematic services
usenet services restart --unhealthy
# Update storage configuration
usenet services sync --storage
bash
# Stop all services gracefully
usenet services stop --all --graceful
# Perform system maintenance
sudo apt update && sudo apt upgrade
# Start services with health checks
usenet services start --all --wait-healthy
# Verify everything is working
usenet services health --detailed
bash
# Check service that won't start
usenet services diagnose jellyfin
# View recent error logs
usenet services logs jellyfin --level error --tail 50
# Reset and restart service
usenet services reset jellyfin
usenet services start jellyfin --wait-healthy
# Verify fix
usenet services health jellyfin
bash
# Monitor resource usage
usenet services stats --live
# Find high CPU usage
usenet services stats --sort cpu --top 5
# Check transcoding performance
usenet services logs tdarr --grep "transcode" --follow
# Optimize based on usage
usenet services optimize --auto
Configuration Files β
Service Definitions β
Services are defined in Docker Compose files:
docker-compose.yml
- Base service definitionsdocker-compose.optimized.yml
- Hardware-optimized settingsdocker-compose.storage.yml
- Dynamic storage mounts
Service Configuration β
Each service has configuration in config/[service]/
:
bash
config/
βββ sonarr/ # Sonarr configuration
βββ radarr/ # Radarr configuration
βββ jellyfin/ # Jellyfin configuration
βββ prowlarr/ # Prowlarr configuration
βββ ... # Other service configs
Security Considerations β
API Security β
bash
# Rotate API keys
usenet services rotate-keys --all
# Check API security
usenet services security-audit
# Update passwords
usenet services update-passwords --interactive
Access Control β
bash
# Show service access
usenet services access --show
# Update firewall rules
usenet services firewall --update
# Enable/disable external access
usenet services external-access jellyfin --disable