longmem status command displays the current state of the memory daemon.
Syntax
Output
When Running
When Stopped
Information Displayed
Daemon Status
Indicates whether the daemon is responding to health checks:running- Daemon is active and respondingstopped- Daemon is not running or not responding
Version
Shows the installed version of LongMem.Database Size
When the daemon is running, shows the size of the SQLite database file (~/.longmem/longmem.db) in megabytes.
Typical sizes:
- New installation: <1 MB
- Active use (1 week): 2-10 MB
- Long-term use (months): 10-100 MB
Detailed Status
For more detailed daemon information, you can query the status endpoint directly:Status Fields
| Field | Description |
|---|---|
pid | Process ID of the daemon |
port | HTTP port the daemon is listening on |
uptime | Seconds since daemon started |
pending | Number of compression jobs in queue |
circuit_open | Whether circuit breaker is open (paused due to errors) |
idle_ms | Milliseconds since last activity |
service_managed | Whether running under systemd/launchd |
version | LongMem version |
Using the Daemon Status Command
You can also run the daemon’s built-in status command for even more detail:Understanding the Fields
PID: Process identifier - useful for troubleshooting or manual kill Port: HTTP API port - must match configuration Uptime: How long the daemon has been running - resets on restart Pending: Compression jobs waiting to be processed:0- All caught up1-10- Normal during active use>50- May indicate compression is struggling or circuit breaker is open
closed- Normal operationOPEN (paused)- Too many compression failures, paused for cooldown
- Low (0-60s) - Active use
- High (>300s) - Idle, may trigger compression
manual- Started withlongmem startsystemd/launchd- Managed by system service manager
Exit Codes
0- Daemon is running1- Daemon is stopped
longmem status in scripts:
Health Check Mechanism
The status command checks daemon health by sending a request to:Troubleshooting
Status shows “stopped” but process is running
- Daemon is running but not responding (hung)
- Different port is configured
- Firewall blocking localhost
Stale PID file
If the daemon crashes, it may leave a stale PID file:Related Commands
longmem start- Start the daemonlongmem stop- Stop the daemonlongmem stats- View memory statisticslongmem logs- View daemon logs