diagnose
Run safe diagnostic commands on the remote memory server. Use for checking logs, container status, disk usage, memory, and running read-only database queries.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Server Diagnostics
The diagnostics script is at tools/diagnose.sh. It provides safe, read-only commands for inspecting the remote server memory at /home/ec2-user/memory.
Commands
Status (overview)
Get overall system health:
./tools/diagnose.sh status
Shows: container status, memory, disk, and recent errors.
Logs
View docker logs:
./tools/diagnose.sh logs # all services, last 100 lines
./tools/diagnose.sh logs api # specific service
./tools/diagnose.sh logs api 500 # last 500 lines
./tools/diagnose.sh logs worker 200 # worker logs
Container Status
./tools/diagnose.sh ps
System Resources
./tools/diagnose.sh disk # disk usage breakdown
./tools/diagnose.sh mem # memory usage
./tools/diagnose.sh top # top processes by memory
File Operations
./tools/diagnose.sh ls <path> # list directory
./tools/diagnose.sh cat <file> # view file
./tools/diagnose.sh tail <file> [lines] # tail file (default: 50)
./tools/diagnose.sh grep <pattern> <path> # search files
Database Queries
Run read-only SQL queries (SELECT only):
./tools/diagnose.sh db "SELECT count(*) FROM source_item"
./tools/diagnose.sh db "SELECT * FROM source_item ORDER BY created_at DESC LIMIT 5"
./tools/diagnose.sh db "SELECT status, count(*) FROM source_item GROUP BY status"
Non-SELECT queries are blocked for safety.
Common Diagnostics
Check why API is failing:
./tools/diagnose.sh logs api 200
Check worker processing:
./tools/diagnose.sh logs worker 100
Database stats:
./tools/diagnose.sh db "SELECT count(*) FROM source_item"
./tools/diagnose.sh db "SELECT modality, count(*) FROM source_item GROUP BY modality"
Find recent errors:
./tools/diagnose.sh status # includes error grep
./tools/diagnose.sh grep "ERROR" src/
Check disk space:
./tools/diagnose.sh disk
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!