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.

SubcommandDescription
deinit credsRemove the credentials file
deinit systemdRemove the systemd service unit
init credsInitialize the credentials file
init systemdCreate and enable a systemd service unit
licensePrint license information
startStart the statistics server
versionPrint the build version
Terminal window
stat.flexfs start [flags]
FlagTypeDefaultDescription
--credsFilestring~/.flexfs/stat/credsCredentials file path

All flags on this page are internal.

FlagTypeDefaultDescription
--bindAddrstring0.0.0.0:443Address and port to bind
--dbFolderstring~/.flexfs/statDatabase folder path
--keyFolderstring~/.flexfs/licenseSigning key folder path
--mockTimeboolfalseSimulate time as 5 minutes after last reported_at
--noSSLboolfalseDisable SSL for the REST API
--pprofboolfalseEnable pprof profiler
--pprofPortint6065Pprof server port
--smtpAddrstringSMTP server address (overrides creds file)
--smtpFromstringSMTP from email address (overrides creds file)
--smtpPassstringSMTP server password (overrides creds file)
--smtpTostringSMTP to email addresses (overrides creds file)
--smtpUserstringSMTP server username (overrides creds file)
--sqliteOptsstring_journal=WAL&_cache_size=10240&_fk=true&_timeout=5000SQLite database connection options
--sslCertstring~/.flexfs/ssl/certSSL certificate file path
--sslKeystring~/.flexfs/ssl/keySSL private key file path
--verbose, -vboolfalseEnable verbose logging
Terminal window
stat.flexfs init creds [flags]

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

FlagTypeDefaultDescription
--forceboolfalseOverwrite existing creds file
--smtpAddrstringemail-smtp.us-east-1.amazonaws.com:587SMTP server address
--smtpFromstringflexFS Service <no-reply@ses.flexfs.io>SMTP from email address
--smtpPassstring""SMTP server password (will prompt if omitted)
--smtpTostring(internal default)SMTP to email addresses (comma-separated)
--smtpUserstring(internal default)SMTP server username
Terminal window
sudo stat.flexfs init systemd [flags]

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

FlagTypeDefaultDescription
--forceboolfalseOverwrite existing systemd unit file
--nowboolfalseStart the service immediately after enabling
--startFlagsstring""Additional flags to pass to the start command
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.

FlagTypeDefaultDescription
--forceboolfalseRemove creds even if referenced by systemd (removes references too)
Terminal window
sudo stat.flexfs deinit systemd

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