Skip to content

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 ​

ActionDescriptionExample
listShow status of all servicesusenet services list
startStart servicesusenet services start sonarr radarr
stopStop servicesusenet services stop jellyfin
restartRestart servicesusenet services restart --all
logsView service logsusenet services logs sonarr --follow
healthCheck service healthusenet services health --detailed
syncSynchronize service APIsusenet 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 ​

CategoryServicesPurpose
Mediajellyfin, overseerr, yacreader, tdarrStreaming and transcoding
Automationsonarr, radarr, readarr, bazarr, prowlarr, recyclarr, mylar, whisparrContent automation
Downloadssabnzbd, transmissionDownload clients
Managementportainer, netdata, jackettSystem management
Networksamba, nfs-serverFile 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 definitions
  • docker-compose.optimized.yml - Hardware-optimized settings
  • docker-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
  • deploy - Deploy all services
  • storage - Configure storage for services
  • hardware - Optimize hardware for services
  • backup - Backup service configurations
  • validate - Validate service health

Built with ❀️ following Bell Labs standards. Dedicated to Stan Eisenstat.