Skip to content

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.

These flags apply to every subcommand.

FlagTypeDefaultDescriptionVisibility
--reportErrorsboolfalseReport errors and panics to Paradigm4Public
SubcommandDescriptionVisibility
deinit credsRemove the credentials filePublic
deinit systemdRemove the systemd service unitPublic
init credsInitialize the credentials filePublic
init systemdCreate and enable a systemd service unitPublic
licensePrint license informationPublic
startStart the statistics serverPublic
versionPrint the build versionPublic
Terminal window
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.

FlagTypeDefaultDescriptionVisibility
--credsFilestring~/.flexfs/stat/credsCredentials file pathPublic
--forceboolfalseRemove creds even if referenced by systemd (removes references too)Public
Terminal window
sudo stat.flexfs deinit systemd

Removes the systemd service unit (flexfs-stat.service) for the stat server. Requires root.

Terminal window
stat.flexfs init creds [flags]

Initializes a credentials file for the stat server with SMTP settings for usage reports.

FlagTypeDefaultDescriptionVisibility
--credsFilestring~/.flexfs/stat/credsCredentials file pathPublic
--forceboolfalseOverwrite existing credentials filePublic
--smtpAddrstring""SMTP server address (required)Public
--smtpFromstring""SMTP from email address (required)Public
--smtpPassstring""SMTP server password (will prompt if omitted and a username is set)Public
--smtpTostring""SMTP to email addresses (comma-separated; required)Public
--smtpUserstring""SMTP server username (required only for authenticated relays)Public
Terminal window
sudo stat.flexfs init systemd [flags]

Creates and enables a systemd service unit (flexfs-stat.service) for the stat server. Requires root.

FlagTypeDefaultDescriptionVisibility
--forceboolfalseOverwrite existing systemd unit filePublic
--nowboolfalseStart the service immediately after enablingPublic
--startFlagsstring""Additional flags to pass to the start commandPublic
Terminal window
stat.flexfs start [flags]

Starts the statistics server, binding the HTTPS endpoint that admin servers relay usage to.

FlagTypeDefaultDescriptionVisibility
--bindAddrstring0.0.0.0:443Address and port to bindPublic
--credsFilestring~/.flexfs/stat/credsCredentials file pathPublic
--dbFolderstring~/.flexfs/statDatabase folder pathPublic
--keyFolderstring~/.flexfs/licenseSigning key folder pathPublic
--mockTimeboolfalseSimulate time as 5 minutes after last reported_atInternal
--noSSLboolfalseDisable SSL for the REST APIPublic
--pprofboolfalseEnable pprof profilerInternal
--pprofPortint6066Pprof server portInternal
--smtpAddrstring""SMTP server address (overrides credentials file)Internal
--smtpFromstring""SMTP from email address (overrides credentials file)Internal
--smtpPassstring""SMTP server password (overrides credentials file)Internal
--smtpTostring""SMTP to email addresses (overrides credentials file)Internal
--smtpUserstring""SMTP server username (overrides credentials file)Internal
--sqliteOptsstring_journal=WAL&_cache_size=10240&_fk=true&_timeout=5000SQLite database connection optionsInternal
--sslCertstring~/.flexfs/ssl/certSSL certificate file pathPublic
--sslKeystring~/.flexfs/ssl/keySSL private key file pathPublic
--verbose, -vboolfalseEnable verbose loggingPublic