Skip to main content

Service management

Controlling the service​

systemctl status wakora-agent
systemctl restart wakora-agent
journalctl -u wakora-agent -f

On OpenRC use rc-service wakora-agent ..., on sysvinit /etc/init.d/wakora-agent ....

Logs​

The agent writes its own log to /var/log/wakora/agent.log (10 MB rotation to .old), and also to the journal on systemd. On Windows the log lives under %ProgramData%\Wakora. One-shot commands (--key, --test, secret) log to stderr only.

tail -f /var/log/wakora/agent.log

Resource budget​

The agent is built to stay light: under 1% CPU and well under 100 MB of RAM at production cadence. Measured across a production fleet at a 60-second interval it sits at 15 to 80 MB of RSS: a quiet box stays near the bottom of that range, a host with hundreds of sites, APM and log shipping near the top. It self-limits in process (GOMEMLIMIT 128 MiB, GOMAXPROCS capped at 2), and the systemd unit adds CPUQuota=30%, Nice=10, and OOMScoreAdjust=500. That last one means that under host memory pressure the kernel kills the agent before any client service.

One deliberate non-limit: the unit sets no cgroup memory limit at all. A cgroup memory limit counts the page cache of every file the process (and its helpers) reads, so any finite limit on a busy host forces the kernel to evict the cache the agent just filled and re-read it from disk every cycle. That turns a memory limit into constant disk I/O (measured live, repeatedly: orders of magnitude difference, and even a generous 1 GB ceiling reproduced it on a large host). The heap is capped in-process, which is the limit that actually matters, and OOMScoreAdjust keeps the kill order honest. An agent that finds itself under a finite limit, ours from an older install or one set by hand, lifts it on its own service, live, through the service manager, and says so in its log. In the same spirit, an agent whose unit predates the current sandbox settings applies them to itself as a drop-in (ProtectSystem=full and friends, no memory limit) and restarts once, on systemd 232 and newer; see the security model.

Host metrics leave on their own schedule, independently of the probe loop, so a probe pass that takes long (a hypervisor node answering its management calls slowly) never thins the CPU and memory series; probes, discovery and logs queue behind each other, the minute-by-minute meters do not.

When the agent is paused​

A host the workspace plan no longer covers (after a downgrade, or while a renewal stays unpaid) is paused from the console side: the agent keeps its connection and keeps updating itself, but collects nothing, and its log says why in a line that starts with ERROR: this host is not monitored. Nothing on the host needs fixing; monitoring resumes on its own, with a fresh discovery, once the host is chosen in Billing, the plan is upgraded or the invoice is paid. wakora doctor prints the same reason first.

Uninstalling​

wakora uninstall removes the agent completely (service, files, binary) and deregisters the host. See Uninstalling.

Dry run​

To see what the agent would collect without connecting:

wakora --test