gpsu serve
Control the fans of every server until stopped
Control the fans of every server in gpsu’s database. Serve Prometheus metrics at /metrics, liveness at /healthz, and readiness at /readyz.
Each server’s controller reads its temperatures every interval and picks a fan speed from its policy. It sets that speed within the configured hard limits. When it cannot read the sensors, it hands fan control back to the iDRAC. A temperature past a limit runs the fans at their maximum. On SIGINT or SIGTERM, every server is handed back to the iDRAC before gpsu exits.
Each startup setting comes from its flag, then its GPSU_ environment variable, then its default. Every other setting lives in gpsu’s database. Admins change it in the web UI, the API, or the command line.
With –passive or a server set to passive, gpsu decides and records fan speeds without sending any fan command. It can then run beside another fan controller for comparison.
Usage
gpsu serve [flags]Examples
# Run with the settings in the environment.
GPSU_PUBLIC_URL=https://gpsu.example.com GPSU_SEAL_KEY_FILE=/run/secrets/seal-key gpsu serve
# Run beside another fan controller without touching any fan.
gpsu serve --public-url http://127.0.0.1:8080 --passiveFlags
| Flag | Type | Default | Description |
|---|---|---|---|
--backup-dir | string | /var/lib/gpsu/backups | directory the backups live in ($GPSU_BACKUP_DIR) |
--listen | string | :8080 | address of the web UI and the API ($GPSU_LISTEN) |
--metrics-listen | string | :9465 | address of /metrics and the health checks ($GPSU_METRICS_LISTEN) |
--passive | bool | decide and record fan speeds for every server without sending any fan command | |
--pprof-api | bool | serve pprof to admins under the API ($GPSU_PPROF_API) | |
--pprof-listen | string | address of pprof without sign-in, or none ($GPSU_PPROF_LISTEN) | |
--public-url | string | URL users reach gpsu at, such as https://gpsu.example.com ($GPSU_PUBLIC_URL) | |
--seal-key-file | string | file holding the seal key ($GPSU_SEAL_KEY_FILE) | |
--seal-key-vault | string | seal key’s key in Vault as [MOUNT:]PATH#KEY ($GPSU_SEAL_KEY_VAULT) | |
--seal-previous-key-files | string | comma-separated files holding previous seal keys ($GPSU_SEAL_PREVIOUS_KEY_FILES) | |
--seal-previous-key-vault | string | comma-separated previous seal keys’ keys in Vault ($GPSU_SEAL_PREVIOUS_KEY_VAULT) | |
--store-driver | string | sqlite | database: sqlite or postgres ($GPSU_STORE_DRIVER) |
--store-path | string | SQLite database file (default /var/lib/gpsu/gpsu.db) ($GPSU_STORE_PATH) | |
--store-uri-file | string | file holding the PostgreSQL connection URI ($GPSU_STORE_URI_FILE) | |
--store-uri-vault | string | PostgreSQL URI’s key in Vault as [MOUNT:]PATH#KEY ($GPSU_STORE_URI_VAULT) | |
--trusted-proxies | string | comma-separated reverse proxies that name the client ($GPSU_TRUSTED_PROXIES) | |
--vault-address | string | Vault’s URL, which turns Vault on ($GPSU_VAULT_ADDRESS) | |
--vault-allow-http | bool | permit an http:// Vault address ($GPSU_VAULT_ALLOW_HTTP) | |
--vault-auth-method | string | Vault login: kubernetes, jwt, approle, or token ($GPSU_VAULT_AUTH_METHOD) | |
--vault-auth-mount | string | where the auth method is mounted ($GPSU_VAULT_AUTH_MOUNT) | |
--vault-auth-role | string | role Kubernetes and JWT auth log in as ($GPSU_VAULT_AUTH_ROLE) | |
--vault-ca-file | string | PEM file of the only CA gpsu trusts for Vault ($GPSU_VAULT_CA_FILE) | |
--vault-namespace | string | Vault namespace ($GPSU_VAULT_NAMESPACE) | |
--vault-role-id | string | AppRole’s role ID ($GPSU_VAULT_ROLE_ID) | |
--vault-secret-id-file | string | file holding AppRole’s secret ID ($GPSU_VAULT_SECRET_ID_FILE) | |
--vault-server-name | string | name Vault’s certificate must show ($GPSU_VAULT_SERVER_NAME) | |
--vault-timeout | string | bound on each request to Vault ($GPSU_VAULT_TIMEOUT) | |
--vault-token-file | string | file holding the JWT or the Vault token ($GPSU_VAULT_TOKEN_FILE) |