Skip to content

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.

SubcommandDescription
filesReport top files by size, size_bin, or cost
foldersReport per-directory recursive size and cost
usersReport per-user size and cost
versionPrint the build version
Terminal window
# From within a flexFS mount
cd /mnt/flexfs && analyze.flexfs files
# Or connect directly to a metadata server
analyze.flexfs files --metaAddr meta.example.com:443 --volume my-vol /data
FlagTypeDefaultDescriptionVisibility
--friendlyboolfalseHuman-friendly output with aligned columns, readable sizes, and dollar costsPublic
--metaAddrstringMetadata server address (must pair with --volume)Public
--mountPathstringClient mount path. Only needed in direct mode when the report path passes through symbolic links whose targets are absolute paths; when run from inside a mount, this is detected automatically.Public
--noDecodeboolfalsePrint base32-encoded pathsPublic
--noMetaSSLboolfalseDisable SSL for metadata server connectionsInternal
--outputFile, -ostringOutput file path. With multiple path arguments, all results go to this one file, with a single header row.Public
--volumestringVolume UUID or name (must pair with --metaAddr)Public

Report paths may pass through symbolic links; links that stay within the volume are followed automatically. A link whose target points outside the volume returns an error that names the link. Error messages are written to standard error, so piped or redirected report output stays clean.

Terminal window
analyze.flexfs files [--limit N] [--orderBy field] [path...]

Reports the top files by size, size_bin, or cost.

FlagTypeDefaultDescription
--limituint32100Maximum number of results (1-1000)
--orderBystringsizeSort field: size, size_bin, or cost
Terminal window
analyze.flexfs folders [--maxDepth N] [path...]

Reports per-directory recursive size and cost.

FlagTypeDefaultDescription
--maxDepthuint320Maximum output depth (0 = unlimited)
Terminal window
analyze.flexfs users [--limit N] [--orderBy field] [path...]

Reports per-user size and cost. Resolves UIDs to usernames when possible.

FlagTypeDefaultDescription
--limituint32100Maximum number of results (1-1000)
--orderBystringcostSort field: size or cost

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.

Terminal window
analyze.flexfs files --limit 5 /mnt/flexfs
path 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.12

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.

Terminal window
analyze.flexfs files --friendly --limit 5 /mnt/flexfs
path 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:

Terminal window
analyze.flexfs folders --friendly --maxDepth 2 /mnt/flexfs
path 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.17

For users:

Terminal window
analyze.flexfs users --friendly /mnt/flexfs
uid user size cost
1001 alice 48.83 GiB $15.23
1002 bob 10.00 GiB $1.12
0 root 100.00 MiB $0.05

The cost field is an estimated monthly storage cost in US dollars ($/month). It is calculated per file as:

cost = (effective_size / 1 GiB) * rate

Where:

  • 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 folders and users, the cost is the sum of per-file costs within the scope.