Watchers are continuous polling loops built into Stratosphere Core that report live system resource usage directly to the terminal. Each watcher targets a specific resource — CPU or RAM — and prints formatted output on every polling cycle, giving you an always-current view of what your system is doing.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/stratosphere-ve/core/llms.txt
Use this file to discover all available pages before exploring further.
How watchers work
Watchers use the gopsutil library to read system metrics at a configurable interval. Each watcher runs as an infinite loop: it samples the target resource, prints the result, then waits for the next polling cycle. Both watchers default to a 1-second polling rate, which you can change from the CLI before starting the loop.Watchers run indefinitely until interrupted. Press Ctrl+C to stop a watcher and return to the CLI menu.
Available watchers
CPU Watcher
Polls overall CPU usage percentage using
cpu.Percent() from gopsutil. Configure the polling interval or start watching immediately.RAM Watcher
Reports total RAM, used RAM in GB, and used RAM percentage using
mem.VirtualMemory() from gopsutil.Accessing watchers from the CLI
When you rungo run main.go, the interactive menu exposes four watcher options:
| Option | Action |
|---|---|
1 | Set the CPU watcher polling rate (changes to 2 seconds), then start the CPU watcher |
2 | Start the CPU watcher immediately with the current polling rate |
3 | Set the RAM watcher polling rate (changes to 2 seconds), then start the RAM watcher |
4 | Start the RAM watcher immediately with the current polling rate |