mc support top locks

The mc support top locks command lists active locks on an AIStor deployment.

By default, the command outputs a table showing the age of each lock, type of lock, owner, and resource:

Since                 Type    Owner                 Resource
13 hours ago          WRITE   10.68.100.18:9000     .minio.sys/leader.lock
13 hours ago          WRITE   10.68.100.18:9000     .minio.sys/callhome/runCallhome.lock
13 hours ago          WRITE   10.68.100.23:9000     .minio.sys/new-drive-healing/0/0

Use --watch to monitor locks in real-time with an interactive TUI.

Syntax

Parameters

TARGET

Required

The full path to the alias or prefix where the command should run.

Not required when using --analyze.

--watch

Optional

Enable real-time monitoring with an interactive TUI.

The TUI displays lock statistics and provides keyboard controls for navigation, sorting, and lock management.

TUI keyboard controls:

Key Action
/ or j/k Navigate through locks
Space Toggle selection of current lock
c Clear all selections
u Force unlock selected locks (with confirmation)
r Manual refresh
s Toggle stale lock filter
a Sort by age
t Sort by type
o Sort by resource
d or Enter View lock details
Esc Exit detail view or quit
q Quit

--interval

Optional

Set the refresh interval for watch mode. Accepts duration values such as 5s, 30s, or 1m.

Defaults to 5s.

Requires --watch.

--analyze

Optional

Analyze locks from a previously captured JSON file instead of querying a live deployment.

Supports the following file formats:

  • .json - Plain JSON
  • .json.gz - Gzip-compressed JSON
  • .json.zst - Zstandard-compressed JSON

To capture locks for later analysis, use the --json global flag:

mc support top locks --json myaistor/ > locks.json

When using --analyze, the TUI runs in offline mode with navigation and viewing capabilities, but without refresh or unlock features.

Global flags

This command supports any of the global flags.

Examples

Display active locks

The following command outputs the active locks on the deployment at alias myaistor:

mc support top locks myaistor/

Watch locks in real-time

The following command starts the interactive TUI to monitor locks in real-time:

mc support top locks --watch myaistor/

Watch with custom refresh interval

The following command monitors locks with a 10-second refresh interval:

mc support top locks --watch --interval 10s myaistor/

Capture locks for offline analysis, then analyze the file

The following command captures lock data to a JSON file:

mc support top locks --json myaistor/ > locks.json
mc support top locks --analyze locks.json

Compressed files are also supported:

mc support top locks --analyze locks.json.zst