PMDaemon v0.1.1 - Enhanced Delete Operations, Health Checks & Monitoring
We're excited to announce PMDaemon v0.1.1, a significant update that brings powerful new features for production environments, enhanced safety mechanisms, and comprehensive health monitoring capabilities.
๐ Major New Featuresโ
Enhanced Delete Operationsโ
This release introduces robust bulk deletion capabilities with safety mechanisms:
- Bulk deletion: Added
delete all
command to stop and delete all processes at once - Status-based deletion: Added
delete <status> --status
to delete processes by their current state- Valid statuses:
starting
,online
,stopping
,stopped
,errored
,restarting
- Valid statuses:
- Force flag: Added
--force
/-f
flag to skip confirmation prompts for automation - Safety confirmations: Interactive prompts for bulk operations to prevent accidental deletions
- Process shutdown: All delete operations now properly stop running processes before deletion
- Enhanced feedback: Clear reporting of how many processes were stopped vs. deleted
# Delete all stopped processes
pmdaemon delete stopped --status --force
# Delete all processes with confirmation
pmdaemon delete all
# Force delete without prompts (for scripts)
pmdaemon delete all --force
Health Checks & Monitoringโ
Advanced health monitoring capabilities that go beyond basic process tracking:
- HTTP Health Checks: Monitor process health via HTTP endpoints (
--health-check-url
) - Script-based Health Checks: Custom health check scripts for complex validation (
--health-check-script
) - Configurable Health Parameters: Timeout (
--health-check-timeout
), interval, and retry settings (--health-check-retries
) - Health-based Auto-restart: Automatic restart when health checks fail
- Monitoring Integration: Health status visible in process listings (
pmdaemon monit
) and web API
# Start with HTTP health check
pmdaemon start app.js --health-check-url http://localhost:3000/health
# Start with custom health script
pmdaemon start app.js --health-check-script ./health-check.sh
Blocking Start Commandโ
Perfect for deployment scripts that need to wait for services to be ready:
- Wait for Ready: Block start command until processes are healthy (
--wait-ready
) - Configurable Wait Timeout: Set maximum wait time for process readiness (
--wait-timeout
) - Progress Indicators: Real-time status updates during health check waiting
- Script-friendly: Ideal for deployment scripts that need to wait for services
# Wait for process to be healthy before continuing
pmdaemon start app.js --wait-ready --wait-timeout 30s
Configurable Monitoring Intervalsโ
Optimize monitoring performance for your specific needs:
- Library: Added
monitor_with_interval(Duration)
method for configurable update intervals - CLI: Added
--interval
/-i
flag tomonit
command for custom refresh rates - Performance optimization: Users can now balance responsiveness vs. resource usage:
- Fast updates (1s) for debugging and development
- Balanced updates (2s) for general use (library default)
- Slower updates (5s+) for reduced system load
# Monitor with 5-second intervals
pmdaemon monit --interval 5
๐ง Enhanced Featuresโ
Professional Monitoring Displayโ
- Beautiful table formatting: Integrated
comfy-table
for professional display - Color-coded status indicators:
- ๐ข Green for Online processes
- ๐ด Red for Stopped/Errored processes
- ๐ก Yellow for Starting/Stopping processes
- ๐ต Blue for Restarting processes
- PID column: Added Process ID display for better debugging and system integration
- Enhanced system overview: Improved system metrics display with proper formatting
Enhanced Log Managementโ
- Real-time log following: Implemented
follow_logs()
method withtail -f
functionality - Configurable log retrieval: Enhanced
get_logs()
method with proper line limiting - Missing file handling: Graceful handling of non-existent log files
- CLI integration:
pmdaemon logs --follow
for real-time log monitoring
๐งช Comprehensive Testingโ
This release significantly expands our test coverage:
- Test count: 267 total tests (up from 158 before health checks & blocking start)
- New coverage: Delete operations (bulk, status-based, safe shutdown), Health Checks (HTTP, script, params), Blocking Start (
--wait-ready
,--wait-timeout
), CLI argument parsing and utility functions, and process lifecycle management. - Enhanced test suites: Added comprehensive tests for all new delete, health check, blocking start functionality, and complete CLI binary test coverage.
- Quality: 100% test success rate with comprehensive error path testing and 80%+ code coverage.
๐ Bug Fixesโ
- Production-ready code: Eliminated all TODO comments from production codebase
- Thread safety: Improved async/await patterns and lock management
- Memory efficiency: Optimized file reading and monitoring operations
๐ Technical Detailsโ
- Dependencies: Added
comfy-table
for professional table formatting - Performance: Configurable intervals allow optimization for different use cases. Health checks add minimal overhead
- Compatibility: Backward compatible - no breaking changes to existing API
Download & Installโ
# Install from crates.io
cargo install pmdaemon
# Or build from source
git clone https://github.com/entrepeneur4lyf/pmdaemon.git
cd pmdaemon
cargo build --release
What's Nextโ
We're continuing to enhance PMDaemon with more advanced features. Stay tuned for upcoming releases!
Full Changelog: v0.1.0...v0.1.1