Thanks to visit codestin.com
Credit goes to docs.jfrog.com

Return Statistics for a JFrog Product

The jf stats command returns usage and capacity statistics for a given product on a configured JFrog server. You must be authenticated. Full output, including JFrog Platform Deployment (JPD) and Project sections, requires administrator privileges. Non-administrator users still receive partial results.

Synopsis

jf stats <product-name> [--format=<format>] [--access-token=<access-token>] [--server-id=<server-id>]

Where:

  • <product-name> — Product to query: artifactory or rt.
  • <format> — Optional. Output format: text (default), table, or json.
  • <access-token> — Optional. Access token to use instead of the configured user token.
  • <server-id> — Optional. Server ID from jf config when not using the default server.

Aliases: jf st

Arguments

The following table lists jf stats arguments.

ArgumentRequiredDescription
<product-name>YesProduct name. Supported: artifactory or rt

Options

The following table lists jf stats options.

FlagShortDefaultDescription
--formattextOutput format: text, table, or json
--access-tokenAccess token. Default uses the logged-in user token
--server-idServer ID from jf config

Prerequisites

To run jf stats successfully:

  • JFrog CLI configured with at least one server (jf config add)
  • Authenticated user token or --access-token flag
  • Administrator privileges are required for complete output. Non-administrator users see partial results. JPD and Project sections show Error: need admin privileges, but the command still exits successfully with the available data.
🚧

Known issue

On some installations, jf stats may print plugin-related error lines before the output. These errors are non-fatal. The command still exits with code 0 and produces correct statistics output. They indicate a problem with the local rt-fs plugin binary, such as a permission or signature verification failure. To resolve the issue, delete the plugin directory at ~/.jfrog/plugins/rt-fs/, reinstall the plugin, or contact your administrator.

The following lines sometimes appear before the statistics output.

[Error] jfrog cli plugins: failed getting signature from plugin: 'rt-fs'. Skiping...
[Error] Error was: signal: killed

Examples

Return Artifactory Statistics

To return statistics in table format:

  • Run using artifactory or rt as the product name.
jf stats artifactory

Output as JSON

To return statistics as JSON:

  • Run:
jf st rt --format=json

Use a Specific Server

To query a non-default configured server:

jf stats <product-name> --server-id=<server-id>

Where:

  • <product-name>artifactory or rt.
  • <server-id> — Value from jf config show.

Example:

jf stats artifactory --server-id=acme-rt-server

When to Use

Use jf stats to return server-level statistics for monitoring, dashboards, or health checks. Common scenarios include the following.

  • Monitoring scripts: Periodically check Artifactory statistics and alert on anomalies
  • Capacity planning: Review storage and artifact counts for infrastructure decisions
  • CI/CD health checks: Verify the server is healthy before starting builds

Expected Output

$ jf stats artifactory --format=table
[Info] Getting all repositories ...
--- Artifactory Statistics ---
Total Projects: 0
Total No of Binaries: 134,763
Total Binaries Size: 1,019.22 GB
Total No of Artifacts: 234,871
Total Artifacts Size: 10.75 TB
Storage Type: s3-storage-v3-direct

--- Repositories Details ---
LOCAL :  1227
REMOTE :  546
VIRTUAL :  337
FEDERATED :  87

--- JPDs ---
Error: need admin privileges

--- Release Bundles ---
Repository Key: acme-release-bundles-v2
Release Bundle Name: my-bundle
Project Key: acme

...and N more release bundles. Use --format=json to retrieve the complete list.

--- PROJECTS ---
Error: need admin privileges
📘

Release bundle list truncation

In table format, the Release Bundles list is truncated when there are many entries. Use --format=json to return the full list.

JSON Output

To return machine-readable statistics:

  • Run:
jf st rt --format=json

The command emits multiple JSON objects — one per data category.

Example output:

{
  "ProjectsCount": 0,
  "TotalBinariesCount": "134,763",
  "TotalBinariesSize": "1,019.22 GB",
  "TotalArtifactsCount": "234,871",
  "TotalArtifactsSize": "10.75 TB",
  "StorageType": "s3-storage-v3-direct"
}
{
  "release_bundles": [
    {
      "repository_key": "acme-release-bundles-v2",
      "release_bundle_name": "my-bundle",
      "project_key": "acme"
    }
  ]
}

To extract a specific field using jq:

  • Run (uses -s to slurp the stream into an array):
jf st rt --format=json | jq -s '.[0].TotalBinariesSize'

What’s Next

To discover all configurable options, run jf options.