analyze.flexfs
analyze.flexfs reports storage usage by file, folder, or user. It queries the metadata server’s REST API and can operate either from within a mounted flexFS directory or by connecting directly via --metaAddr and --volume.
Subcommands
Section titled “Subcommands”| Subcommand | Description |
|---|---|
files | Report top files by size, size_bin, or cost |
folders | Report per-directory recursive size and cost |
users | Report per-user size and cost |
version | Print the build version |
# From within a flexFS mountcd /mnt/flexfs && analyze.flexfs files
# Or connect directly to a metadata serveranalyze.flexfs files --metaAddr meta.example.com:443 --volume my-vol /dataGlobal Flags
Section titled “Global Flags”| Flag | Type | Default | Description | Visibility |
|---|---|---|---|---|
--friendly | bool | false | Human-friendly output with aligned columns, readable sizes, and dollar costs | Public |
--metaAddr | string | Metadata server address (must pair with --volume) | Public | |
--noDecode | bool | false | Print base32-encoded paths | Public |
--noMetaSSL | bool | false | Disable SSL for metadata server connections | Internal |
--outputFile, -o | string | Output file path | Public | |
--volume | string | Volume UUID or name (must pair with --metaAddr) | Public |
analyze.flexfs files [--limit N] [--orderBy field] [path...]Reports the top files by size, size_bin, or cost.
| Flag | Type | Default | Description |
|---|---|---|---|
--limit | uint32 | 100 | Maximum number of results (1-1000) |
--orderBy | string | cost | Sort field: size, size_bin, or cost |
folders
Section titled “folders”analyze.flexfs folders [--maxDepth N] [path...]Reports per-directory recursive size and cost.
| Flag | Type | Default | Description |
|---|---|---|---|
--maxDepth | uint32 | 0 | Maximum output depth (0 = unlimited) |
analyze.flexfs users [--limit N] [--orderBy field] [path...]Reports per-user size and cost. Resolves UIDs to usernames when possible.
| Flag | Type | Default | Description |
|---|---|---|---|
--limit | uint32 | 100 | Maximum number of results (1-1000) |
--orderBy | string | cost | Sort field: size or cost |
Output Format
Section titled “Output Format”By default, output is tab-separated with a header row. The first line always contains column names. The files subcommand outputs path followed by size/cost fields. The folders subcommand outputs path followed by aggregate stats. The users subcommand outputs UID, username, and cost fields.
Default (TSV) output
Section titled “Default (TSV) output”analyze.flexfs files --limit 5 /mnt/flexfspath size size_bin cost/data/genome/sample1.bam 52428800000 62 15.23/data/genome/sample2.bam 48318382080 61 14.02/data/genome/reference.fa 3221225472 4 1.50/data/logs/pipeline.log 104857600 0 0.05/data/tmp/scratch.dat 10737418240 45 1.12Friendly output
Section titled “Friendly output”When --friendly is set, output uses aligned columns with human-readable sizes (GiB, MiB, etc.), dollar-formatted costs, and access-age day ranges in interval notation. Headers are always included.
analyze.flexfs files --friendly --limit 5 /mnt/flexfspath size cost accessed/mnt/flexfs/data/genome/sample1.bam 48.83 GiB $15.23 [1860, 1890) days ago (bin 62)/mnt/flexfs/data/genome/sample2.bam 45.00 GiB $14.02 [1830, 1860) days ago (bin 61)/mnt/flexfs/data/genome/reference.fa 3.00 GiB $1.50 [120, 150) days ago (bin 4)/mnt/flexfs/data/logs/pipeline.log 100.00 MiB $0.05 < 30 days ago (bin 0)/mnt/flexfs/data/tmp/scratch.dat 10.00 GiB $1.12 [1350, 1380) days ago (bin 45)For folders, friendly mode renders an ASCII directory tree:
analyze.flexfs folders --friendly --maxDepth 2 /mnt/flexfspath size cost/mnt/flexfs 62.83 GiB $17.69├── data 52.83 GiB $16.52│ ├── genome 51.83 GiB $16.02│ ├── logs 100.00 MiB $0.05│ └── tmp 10.00 GiB $1.12└── scratch 10.00 GiB $1.17For users:
analyze.flexfs users --friendly /mnt/flexfsuid user size cost1001 alice 48.83 GiB $15.231002 bob 10.00 GiB $1.120 root 100.00 MiB $0.05Cost Field
Section titled “Cost Field”The cost field is an estimated monthly storage cost in US dollars ($/month). It is calculated per file as:
cost = (effective_size / 1 GiB) * rateWhere:
- effective_size is the smaller of the file’s logical size and its allocated block size (
blksize * blocks). This prevents sparse files from being overcharged. - rate is a per-GiB monthly dollar rate determined by the file’s size bin — an access-age tier based on how long since the file was last accessed (
atime). Each 30-day increment maps to a bin (bin 0 = accessed within the last 30 days, bin 1 = 30-60 days ago, up to bin 74). Rate bins are configured per account and can assign different $/GiB/month rates to each tier, enabling tiered pricing where recently-accessed “hot” data may cost more than cold data. - Files with multiple hard links are counted only once.
- For
foldersandusers, the cost is the sum of per-file costs within the scope.