stat.flexfs
stat.flexfs collects usage statistics from admin servers, stores them in its database, and sends periodic usage reports via SMTP. It also manages license grants that are returned to admin servers as part of the stats relay flow.
Persistent Flags
Section titled “Persistent Flags”These flags apply to every subcommand.
| Flag | Type | Default | Description | Visibility |
|---|---|---|---|---|
--reportErrors | bool | false | Report errors and panics to Paradigm4 | Public |
Subcommands
Section titled “Subcommands”| Subcommand | Description | Visibility |
|---|---|---|
deinit creds | Remove the credentials file | Public |
deinit systemd | Remove the systemd service unit | Public |
init creds | Initialize the credentials file | Public |
init systemd | Create and enable a systemd service unit | Public |
license | Print license information | Public |
start | Start the statistics server | Public |
version | Print the build version | Public |
deinit creds
Section titled “deinit creds”stat.flexfs deinit creds [flags]Removes the credentials file for the stat server. If the credentials file is referenced by a systemd unit, the command refuses unless --force is passed, in which case it removes the references too.
| Flag | Type | Default | Description | Visibility |
|---|---|---|---|---|
--credsFile | string | ~/.flexfs/stat/creds | Credentials file path | Public |
--force | bool | false | Remove creds even if referenced by systemd (removes references too) | Public |
deinit systemd
Section titled “deinit systemd”sudo stat.flexfs deinit systemdRemoves the systemd service unit (flexfs-stat.service) for the stat server. Requires root.
init creds
Section titled “init creds”stat.flexfs init creds [flags]Initializes a credentials file for the stat server with SMTP settings for usage reports.
| Flag | Type | Default | Description | Visibility |
|---|---|---|---|---|
--credsFile | string | ~/.flexfs/stat/creds | Credentials file path | Public |
--force | bool | false | Overwrite existing credentials file | Public |
--smtpAddr | string | "" | SMTP server address (required) | Public |
--smtpFrom | string | "" | SMTP from email address (required) | Public |
--smtpPass | string | "" | SMTP server password (will prompt if omitted and a username is set) | Public |
--smtpTo | string | "" | SMTP to email addresses (comma-separated; required) | Public |
--smtpUser | string | "" | SMTP server username (required only for authenticated relays) | Public |
init systemd
Section titled “init systemd”sudo stat.flexfs init systemd [flags]Creates and enables a systemd service unit (flexfs-stat.service) for the stat server. Requires root.
| Flag | Type | Default | Description | Visibility |
|---|---|---|---|---|
--force | bool | false | Overwrite existing systemd unit file | Public |
--now | bool | false | Start the service immediately after enabling | Public |
--startFlags | string | "" | Additional flags to pass to the start command | Public |
stat.flexfs start [flags]Starts the statistics server, binding the HTTPS endpoint that admin servers relay usage to.
| Flag | Type | Default | Description | Visibility |
|---|---|---|---|---|
--bindAddr | string | 0.0.0.0:443 | Address and port to bind | Public |
--credsFile | string | ~/.flexfs/stat/creds | Credentials file path | Public |
--dbFolder | string | ~/.flexfs/stat | Database folder path | Public |
--keyFolder | string | ~/.flexfs/license | Signing key folder path | Public |
--mockTime | bool | false | Simulate time as 5 minutes after last reported_at | Internal |
--noSSL | bool | false | Disable SSL for the REST API | Public |
--pprof | bool | false | Enable pprof profiler | Internal |
--pprofPort | int | 6066 | Pprof server port | Internal |
--smtpAddr | string | "" | SMTP server address (overrides credentials file) | Internal |
--smtpFrom | string | "" | SMTP from email address (overrides credentials file) | Internal |
--smtpPass | string | "" | SMTP server password (overrides credentials file) | Internal |
--smtpTo | string | "" | SMTP to email addresses (overrides credentials file) | Internal |
--smtpUser | string | "" | SMTP server username (overrides credentials file) | Internal |
--sqliteOpts | string | _journal=WAL&_cache_size=10240&_fk=true&_timeout=5000 | SQLite database connection options | Internal |
--sslCert | string | ~/.flexfs/ssl/cert | SSL certificate file path | Public |
--sslKey | string | ~/.flexfs/ssl/key | SSL private key file path | Public |
--verbose, -v | bool | false | Enable verbose logging | Public |