Observed since 20 Oct, 15:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Collect and expose lightweight system snapshots (CLI).
30secs is an ultra-lightweight system monitoring tool that takes system snapshots every 30 seconds (default), or returns snapshots on-demand via CLI.
⚠️ Python module names cannot start with a number, so while the project is named
30secs, the import package isthirtysecs.
Download the pre-built binary for your platform:
# Linux AMD64 (most K8s nodes)
curl -L https://github.com/<your-repo>/30secs/releases/latest/download/30secs-linux-amd64 -o 30secs
# Linux ARM64 (Graviton, etc.)
curl -L https://github.com/<your-repo>/30secs/releases/latest/download/30secs-linux-arm64 -o 30secs
# macOS Apple Silicon
curl -L https://github.com/<your-repo>/30secs/releases/latest/download/30secs-darwin-arm64 -o 30secs
# macOS Intel
curl -L https://github.com/<your-repo>/30secs/releases/latest/download/30secs-darwin-amd64 -o 30secs
# Make executable and run
chmod +x 30secs
./30secs watch -f table --alerts
curl -sL https://github.com/<your-repo>/30secs/releases/latest/download/30secs-linux-amd64 -o /tmp/30secs \
&& chmod +x /tmp/30secs \
&& /tmp/30secs watch -f table --alerts -i 10
# Install from PyPI (Python 3.12+ required)
pip install 30secs
# Or use pipx for isolated install
pipx install 30secs
# Or use uv
uv tool install 30secs
# Then run
30secs watch -f table --alerts -i 10
pip install 30secs && 30secs watch -f table --alerts -i 10
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
uv run 30secs snapshot
uv run 30secs snapshot --format table
uv run 30secs snapshot --format prometheus
uv run 30secs watch
uv run 30secs watch --interval 10
uv run 30secs watch --format table --interval 5
uv run 30secs quick
uv run 30secs watch --alerts
uv run 30secs watch --output metrics.jsonl
uv run 30secs watch --count 10 --interval 5
uv run 30secs snapshot --no-processes --no-network
uv run 30secs leak <PID> --interval 2 --count 30
uv run 30secs leak <PID> --format json --interval 1 --count 60
uv run 30secs leak top --interval 1 --count 20 --limit 5
Complete system metrics in JSON format, suitable for log aggregation and processing.
Human-readable format with emojis and organized sections:
Metrics in Prometheus exposition format, ready for scraping.
Built-in alert thresholds:
When alerts are enabled (--alerts), the tool will:
snapshot command)uv run pytest
uv run ruff check .
uv run ruff format .
uv run mypy src
src/thirtysecs/
├── __init__.py # Package init
├── __main__.py # Entry point
├── cli.py # CLI interface
├── config.py # Configuration
├── core.py # Core snapshot logic
├── alerts.py # Alert system
├── errors.py # Error definitions
├── logging.py # Structured logging
├── collectors/ # Metric collectors
│ ├── base.py # Base collector interface
│ ├── cpu.py # CPU metrics
│ ├── memory.py # Memory metrics
│ ├── disk.py # Disk metrics
│ ├── network.py # Network metrics
│ ├── process.py # Process metrics
│ └── system.py # System info
└── formatters/ # Output formatters
├── base.py # Base formatter interface
├── json_fmt.py # JSON output
├── table.py # Table output
└── prometheus.py # Prometheus metrics
| Variable | Default | Description |
|---|---|---|
SERVICE_NAME | 30secs | Service name for health checks |
DEFAULT_INTERVAL_SECONDS | 30 | Default watch interval |
INCLUDE_HOSTNAME | 1 | Include hostname in output |
LOG_LEVEL | INFO | Logging level |
ALERT_CPU_THRESHOLD | 90.0 | CPU usage alert threshold (%) |
ALERT_MEMORY_THRESHOLD | 90.0 | Memory usage alert threshold (%) |
ALERT_MEMORY_CRITICAL_THRESHOLD | 95.0 | Critical memory alert threshold (%) |
ALERT_SWAP_THRESHOLD | 80.0 | Swap usage alert threshold (%) |
MEMORY_LEAK_WINDOW_SIZE | 10 | Number of samples for leak detection |
MEMORY_LEAK_GROWTH_THRESHOLD | 5.0 | Memory growth % to trigger leak alert |
30secs includes automatic memory leak detection when using --alerts:
# Monitor with leak detection (default: 10 samples, 5% growth threshold)
30secs watch -f table --alerts -i 10
# Custom thresholds via environment variables
MEMORY_LEAK_WINDOW_SIZE=20 MEMORY_LEAK_GROWTH_THRESHOLD=3.0 30secs watch --alerts -i 5
The detector tracks memory usage over a sliding window and alerts when:
| Command | Description |
|---|---|
uv add <pkg> | Add a dependency |
uv add --group dev <pkg> | Add a dev dependency |
uv lock | Lock dependencies |
uv sync | Sync dependencies |
uv run --frozen ... | Run with locked dependencies |
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.9 | 15 Feb 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 15:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:bc4847177cd605f6f9d25b37d5be9b7ed8e3bcd6c93c460e77f972eda39bbfe9