TOP INSTANCE
Views information about running instances in a project, including InstanceID, Owner, Type, StartTime, Progress, Status, Priority, RuntimeUsage (CPU/MEM), totalUsage (CPU/MEM), and QueueingInfo (POS/LEN).
Syntax
-- View running instances submitted by the current account in the current project.
top instance;
-- View all or a specified number of running instances in the current project.
top instance [-all] [-limit <number>];
Parameters
| Parameter | Required | Description |
|---|---|---|
-all |
No | Returns information about all running instances in the current project. By default, up to 50 instances are returned. |
-limit <number> |
No | Limits the number of instances returned. Replace <number> with the maximum number of instances to display. |
Output fields
| Field | Description |
|---|---|
| InstanceID | Unique identifier of the instance. |
| Owner | Account that submitted the instance. |
| Type | Instance type (for example, SQL). |
| StartTime | Time the instance started. |
| Progress | Execution progress of the instance. |
| Status | Current state of the instance. |
| Priority | Scheduling priority of the instance. |
| RuntimeUsage (CPU) | CPU resources consumed by the instance. |
| RuntimeUsage (MEM) | Memory resources consumed by the instance. |
| totalUsage (CPU) | Total CPU resources consumed by the instance. |
| totalUsage (MEM) | Total memory resources consumed by the instance. |
| QueueingInfo (POS) | Position of the instance in the queue. |
| QueueingInfo (LEN) | Total number of instances currently in the queue. |
Examples
Return the first five running instances in the current project:
top instance -limit 5;
Output:
QueueingInstances: 0 total.
Return all running instances in the current project:
top instance -all;
Related commands
After identifying an instance with top instance, use the following commands to investigate or take action:
-
DESC INSTANCE: Gets detailed job information by instance ID, including SQL, Owner, StartTime, EndTime, and Status.
-
STATUS: Checks the current status of a specific instance.
-
KILL: Stops a specific instance.
-
SHOW: Views instance details including StartTime (accurate to the second), RunTime (in seconds), Status, InstanceID, Owner, and query statements.
-
WAIT: Gets run logs for a specific instance. The output includes a Logview URL.