Skip to content

Diagnose and repair

When a node stops working, or something is off after a reboot, run:

bash
psm doctor

It checks item by item (ok / warning / critical / skipped) and ends by telling you how many problems it can repair.

psm doctor report

Repairing

bash
psm doctor --fix

Everything it knows a safe repair for gets repaired, and then everything is checked again:

ProblemRepair
A core service stoppedconfig checked, then restarted; a missing service definition is written first
A core still runs as rootmoved to the unprivileged user psm-core
Not started at bootre-enabled
Port-hopping redirect rules lostrebuilt from the node records
curl, jq or openssl missinginstalled; a jq that is too old (1.6) is replaced
A certificate about to expirerenewed through acme.sh
Disk nearly fulljournal, oversized PSM logs and the package cache cleaned

A config file with errors is only reported, never rewritten, so a repair cannot make things worse. --fix needs root.

For scripts and monitoring

bash
psm doctor --json

Structured JSON; exit code 0 healthy, 1 something critical, 2 usage error. Plug it into your own monitoring or cron jobs.

Released under the AGPL-3.0 license · For lawful use only; follow the laws where you live