cacheout_get_compressor_health
Retrieve macOS memory compressor health metrics including compression ratio, compression/decompression rates, thrashing detection, and pressure level. Uses two samples to compute instantaneous rates.
Instructions
Get macOS memory compressor health metrics.
Returns compressor ratio, compression/decompression rates (via dual-sample), thrashing detection, pressure level, and trend information.
Takes two samples ~1 second apart to compute instantaneous rates. Thrashing is flagged when decompression_rate > 100/sec AND > 2x compression_rate (aligned with CompressorTracker.swift thresholds).
Trend requires multiple invocations over time — a single call returns "unknown" with partial=true.
In standalone mode, reads vm_stat and sysctl directly.
In app mode, delegates to --cli memory-stats.
Returns: str: JSON envelope with mode, capabilities, data (ratio, rates, thrashing), partial.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |