Return Statistics for a JFrog Product

Return usage and capacity statistics for a JFrog product with the jf stats command.

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, either artifactory or rt.
  • <FORMAT>: Optional. Output format, either 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 (run 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.
🚧

Warning

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:

  • Run:
jf stats <PRODUCT_NAME> --server-id=<SERVER_ID>

Where:

  • <PRODUCT_NAME>: Either 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.
  • Continuous integration and delivery (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. Refer JSON output format for complete list.

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

Note

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

Retrieve Statistics as JSON

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'

Frequently Asked Questions

This section provides answers to frequently asked questions.

plusFAQs
Q: How do I return statistics for Artifactory using JFrog CLI?

A: Run jf stats artifactory (or jf stats rt). See Return Artifactory Statistics for the full example.

Q: What permissions do I need to see the full jf stats output?

A: You need administrator privileges. Without them, the JPD and Project sections show Error: need admin privileges while the rest of the output still returns.

Q: What does it mean if jf stats prints plugin-related error lines before the output?

A: These are non-fatal errors related to the local rt-fs plugin binary. The command still exits with code 0 and returns correct statistics. See Prerequisites for how to resolve them.

Q: What is the difference between the table and JSON output formats?

A: Table format truncates long Release Bundle lists, while --format=json returns the complete, untruncated data. See Retrieve Statistics as JSON.

Q: Can I query a non-default JFrog server with jf stats?

A: Yes. Use the --server-id flag with a server ID from jf config show. See Use a Specific Server.

Related Topics


What’s Next

To discover all configurable options, run jf options.

Did this page help you?