Claude-skill-registry blueplane
Manage Blueplane telemetry server using server_ctl.py for starting, stopping, restarting, viewing logs, and checking system status. Essential for development workflow and debugging.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/blueplane" ~/.claude/skills/majiayu000-claude-skill-registry-blueplane && rm -rf "$T"
skills/data/blueplane/SKILL.mdBlueplane Server Management
Overview
The Blueplane telemetry processing server is controlled via
scripts/server_ctl.py. This skill covers all server lifecycle operations, log monitoring, and status checking.
Quick Reference
# Start/Stop/Restart python scripts/server_ctl.py start # Start in foreground python scripts/server_ctl.py start --daemon # Start in background (daemon) python scripts/server_ctl.py stop # Graceful shutdown python scripts/server_ctl.py stop --force # Force kill python scripts/server_ctl.py restart # Stop then start python scripts/server_ctl.py restart --daemon # Restart as daemon # Status & Monitoring python scripts/server_ctl.py status # Check if running python scripts/server_ctl.py status --verbose # Detailed status # View Logs tail -f ~/.blueplane/server.log # Live log monitoring tail -n 100 ~/.blueplane/server.log # Last 100 lines
Commands
start
- Start Server
startStarts the Blueplane telemetry processing server.
Usage:
python scripts/server_ctl.py start [--daemon] [--verbose]
Options:
: Run server in background (daemon mode)--daemon, -d
: Enable verbose output--verbose, -v
Examples:
# Start in foreground (good for debugging) python scripts/server_ctl.py start # Start as daemon (good for production) python scripts/server_ctl.py start --daemon python scripts/server_ctl.py start -d # Start with verbose output python scripts/server_ctl.py start -d -v
When to Use:
- Foreground: When debugging, testing, or need immediate feedback
- Daemon: For long-running operation, production, or background processing
stop
- Stop Server
stopGracefully stops the running server with optional force kill.
Usage:
python scripts/server_ctl.py stop [--force] [--timeout TIMEOUT] [--verbose]
Options:
: Force kill if graceful shutdown fails--force, -f
: Timeout in seconds (default: 30)--timeout TIMEOUT, -t TIMEOUT
: Enable verbose output--verbose, -v
Examples:
# Graceful shutdown (preferred) python scripts/server_ctl.py stop # Force kill if stuck python scripts/server_ctl.py stop --force python scripts/server_ctl.py stop -f # Custom timeout python scripts/server_ctl.py stop --timeout 60 # Verbose stop with force fallback python scripts/server_ctl.py stop -v -f
Shutdown Process:
- Sends SIGTERM (graceful shutdown signal)
- Waits for timeout period (default 30s)
- If
specified and still running, sends SIGKILL--force - Cleans up PID file
restart
- Restart Server
restartStops the server (if running) and starts it again.
Usage:
python scripts/server_ctl.py restart [--daemon] [--force] [--timeout TIMEOUT] [--verbose]
Options:
- Combines all options from
andstopstart
: Restart in daemon mode--daemon, -d
: Force kill during stop if needed--force, -f
: Stop timeout in seconds--timeout TIMEOUT, -t TIMEOUT
: Enable verbose output--verbose, -v
Examples:
# Restart in foreground python scripts/server_ctl.py restart # Restart as daemon (most common) python scripts/server_ctl.py restart --daemon python scripts/server_ctl.py restart -d # Force restart with custom timeout python scripts/server_ctl.py restart -d -f -t 60 # Verbose restart python scripts/server_ctl.py restart -d -v
When to Restart:
- After code changes
- After configuration updates
- After Redis schema changes
- When server is unresponsive but
alone won't workstop
status
- Check Server Status
statusCheck if the server is running and get health information.
Usage:
python scripts/server_ctl.py status [--verbose]
Options:
: Show detailed status information--verbose, -v
Examples:
# Basic status check python scripts/server_ctl.py status # Detailed status with health checks python scripts/server_ctl.py status --verbose python scripts/server_ctl.py status -v
Output Includes:
- Process status (running/stopped)
- PID information
- Server uptime
- Verbose mode adds:
- Redis connection status
- Database file status
- Consumer group information
- Recent activity metrics
Log Management
Log File Location
~/.blueplane/server.log
Common Log Commands
# Watch logs in real-time (best for monitoring) tail -f ~/.blueplane/server.log # Last N lines tail -n 50 ~/.blueplane/server.log # Last 50 lines tail -n 100 ~/.blueplane/server.log # Last 100 lines # Search logs grep "ERROR" ~/.blueplane/server.log grep "Claude Code" ~/.blueplane/server.log grep -i "redis" ~/.blueplane/server.log # Case insensitive # Filter by component grep "event_consumer" ~/.blueplane/server.log grep "jsonl_monitor" ~/.blueplane/server.log grep "database_monitor" ~/.blueplane/server.log # View logs with timestamps tail -f ~/.blueplane/server.log | grep "$(date +%Y-%m-%d)" # Count errors grep -c "ERROR" ~/.blueplane/server.log grep -c "WARNING" ~/.blueplane/server.log
Log Levels
Logs use Python logging levels:
- DEBUG: Detailed diagnostic information
- INFO: General informational messages
- WARNING: Warning messages for potential issues
- ERROR: Error messages for failures
- CRITICAL: Critical failures
Background Log Monitoring
# Run tail in background and monitor periodically tail -f ~/.blueplane/server.log & # Kill background tail pkill -f "tail -f.*server.log"
System Health Checks
Check Redis Streams
# Check stream lengths redis-cli XLEN telemetry:message_queue redis-cli XLEN telemetry:message_queue redis-cli XLEN cdc:events # Check consumer groups redis-cli XINFO GROUPS telemetry:message_queue redis-cli XINFO GROUPS cdc:events # Check pending messages redis-cli XPENDING telemetry:message_queue processors
Check Database
# Check database file ls -lh ~/.blueplane/telemetry.db # SQLite query examples sqlite3 ~/.blueplane/telemetry.db "SELECT COUNT(*) FROM claude_raw_traces;" sqlite3 ~/.blueplane/telemetry.db "SELECT COUNT(*) FROM cursor_raw_traces;"
Check Process
# Check if process is running ps aux | grep server.py # Check PID file cat ~/.blueplane/server.pid # Check resource usage ps aux | grep server.py | awk '{print $3, $4, $11}' # CPU, MEM, COMMAND
Typical Workflows
Development Workflow
# 1. Make code changes # 2. Restart server to pick up changes python scripts/server_ctl.py restart --daemon # 3. Monitor logs for issues tail -f ~/.blueplane/server.log # 4. Check status python scripts/server_ctl.py status --verbose
Debugging Issues
# 1. Check if server is running python scripts/server_ctl.py status -v # 2. View recent logs tail -n 200 ~/.blueplane/server.log | grep -i error # 3. Stop server python scripts/server_ctl.py stop # 4. Clear any stale state (optional) rm ~/.blueplane/server.pid # 5. Start in foreground to see live output python scripts/server_ctl.py start # 6. Once working, restart as daemon python scripts/server_ctl.py restart -d
Production Deployment
# 1. Stop existing server gracefully python scripts/server_ctl.py stop --timeout 60 # 2. Verify stopped python scripts/server_ctl.py status # 3. Start as daemon python scripts/server_ctl.py start --daemon # 4. Verify running python scripts/server_ctl.py status --verbose # 5. Monitor logs briefly tail -n 50 ~/.blueplane/server.log
After Configuration Changes
# Changes to config files in ~/.blueplane/ or config/ python scripts/server_ctl.py restart --daemon # Monitor to ensure clean restart tail -f ~/.blueplane/server.log # Look for "Server started successfully" message
Important Files & Directories
~/.blueplane/ ├── server.log # Main log file ├── server.pid # PID file (JSON format with metadata) ├── telemetry.db # SQLite database ├── config.yaml # Configuration (if present) └── workspace_cache.db # Workspace mappings cache scripts/ ├── server_ctl.py # Server control CLI (this skill) └── start_server.py # Actual server implementation
Troubleshooting
Server Won't Start
# Check if already running python scripts/server_ctl.py status # Check for stale PID file cat ~/.blueplane/server.pid ps aux | grep $(cat ~/.blueplane/server.pid | jq -r .pid) # Force cleanup python scripts/server_ctl.py stop --force rm ~/.blueplane/server.pid # Try starting again python scripts/server_ctl.py start
Server Won't Stop
# Try force stop python scripts/server_ctl.py stop --force # If still stuck, manual kill kill -9 $(cat ~/.blueplane/server.pid | jq -r .pid) rm ~/.blueplane/server.pid
Server Running But Not Processing
# Check status with verbose python scripts/server_ctl.py status --verbose # Check Redis connection redis-cli PING # Check consumer groups redis-cli XINFO GROUPS telemetry:message_queue # Restart server python scripts/server_ctl.py restart --daemon
High CPU/Memory Usage
# Check resource usage ps aux | grep server.py # Check stream lengths (may be backlog) redis-cli XLEN telemetry:message_queue redis-cli XLEN cdc:events # Check logs for errors grep -i "error\|warning" ~/.blueplane/server.log | tail -50 # Consider restarting python scripts/server_ctl.py restart --daemon
Best Practices
-
Always use daemon mode for long-running operation
python scripts/server_ctl.py restart --daemon -
Use foreground mode when debugging
python scripts/server_ctl.py start # No --daemon -
Check status after restart
python scripts/server_ctl.py restart -d && sleep 2 && python scripts/server_ctl.py status -v -
Monitor logs after changes
python scripts/server_ctl.py restart -d && tail -f ~/.blueplane/server.log -
Graceful shutdown preferred over force
# Good python scripts/server_ctl.py stop # Only if stuck python scripts/server_ctl.py stop --force -
Use verbose mode for detailed debugging
python scripts/server_ctl.py status --verbose
Integration with Development
Git Workflow
After pulling changes:
git pull python scripts/server_ctl.py restart --daemon tail -f ~/.blueplane/server.log
Testing Changes
# Stop server python scripts/server_ctl.py stop # Run tests pytest tests/ # Restart server python scripts/server_ctl.py start --daemon
Pre-commit
Before committing changes that affect the server:
# Restart to verify changes work python scripts/server_ctl.py restart --daemon # Check logs for errors tail -n 100 ~/.blueplane/server.log | grep -i error # Commit if clean git add . && git commit
Database Overview
Blueplane uses a hybrid storage approach with SQLite for persistent storage and Redis for message queuing and real-time metrics.
Storage Architecture
~/.blueplane/ ├── telemetry.db # SQLite database (primary storage) ├── server.log # Server logs ├── server.pid # Process ID file └── config.yaml # User configuration (optional)
SQLite Database Schema
The SQLite database (
~/.blueplane/telemetry.db) contains the following main tables:
1. claude_raw_traces
- Claude Code Events
claude_raw_tracesStores all events from Claude Code JSONL transcripts.
Key Fields:
- Auto-incrementing primary keysequence
- Unique event identifierevent_id
- Claude session/conversation IDexternal_id
- Type of event (message, tool_use, system_event, etc.)event_type
- Always 'claude_code'platform
- Event timestamptimestamp
- Claude event UUID (for threading)uuid
- Parent event UUID (for threading)parent_uuid
- Workspace identifierworkspace_hash
- Human-readable project nameproject_name
- user/assistant (for message events)message_role
- Model used (e.g., claude-sonnet-4.5)message_model
,input_tokens
- Token usageoutput_tokens
- Compressed full event (zlib)event_data
2. cursor_raw_traces
- Cursor Events
cursor_raw_tracesStores all events from Cursor database monitoring.
Key Fields:
- Auto-incrementing primary keysequence
- Unique event identifierevent_id
- Cursor session IDexternal_session_id
- Type of eventevent_type
- Event timestamptimestamp
- Workspace identifierworkspace_hash
- Source table in Cursor DBdatabase_table
- AI generation identifiergeneration_uuid
- Composer session identifiercomposer_id
- Chat bubble identifierbubble_id
- Compressed full event (zlib)event_data
3. conversations
- Unified Conversations Table
conversationsTracks conversations across both platforms.
Key Fields:
- Internal conversation ID (UUID)id
- NULL for Claude Code, references cursor_sessions.id for Cursorsession_id
- Platform-specific external IDexternal_id
- 'claude_code' or 'cursor'platform
- Workspace identifierworkspace_hash
- Human-readable workspace nameworkspace_name
- Conversation start timestampstarted_at
- Conversation end timestamp (NULL if active)ended_at
- Number of interactionsinteraction_count
- Code acceptance rateacceptance_rate
- Total tokens usedtotal_tokens
- Total code changestotal_changes
Important Platform Differences:
- Claude Code:
is always NULL (sessions = conversations)session_id - Cursor:
references asession_id
entrycursor_sessions
4. cursor_sessions
- Cursor IDE Sessions
cursor_sessionsStores Cursor IDE window sessions (Cursor only, no Claude Code sessions).
Key Fields:
- Internal session ID (UUID)id
- Session ID from Cursor extensionexternal_session_id
- Workspace identifierworkspace_hash
- Human-readable workspace nameworkspace_name
- Full workspace pathworkspace_path
- Session start timestampstarted_at
- Session end timestamp (NULL if active)ended_at
Redis Streams
Redis streams are used for message queuing and event processing:
- Main event stream (from capture → processing)telemetry:message_queue
- Legacy stream nametelemetry:message_queue
- Change data capture events (database updates)cdc:events
Decompressing Event Data
The
event_data field in raw trace tables is compressed with zlib. To decompress and view full event data:
import sqlite3 import zlib import json from pathlib import Path db_path = Path.home() / '.blueplane' / 'telemetry.db' conn = sqlite3.connect(str(db_path)) # Get an event cursor = conn.execute(""" SELECT event_data FROM claude_raw_traces WHERE sequence = ? """, (1,)) row = cursor.fetchone() if row: compressed_data = row[0] decompressed = zlib.decompress(compressed_data) event = json.loads(decompressed) print(json.dumps(event, indent=2))
See Also
- Redis Streams: Check stream health and consumer groups
- Database Schema: Check SQLite database for data integrity
- Configuration:
or~/.blueplane/config.yamlconfig/config.yaml - Log Analysis: Search and filter logs for specific issues
- Session & Conversation Schema: See
for detailed schema designdocs/SESSION_CONVERSATION_SCHEMA.md