> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyceum.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# Get execution metrics

> Get GPU and system metrics from Prometheus for a specific execution.

This endpoint queries Grafana Cloud's Prometheus for GPU and system metrics
associated with the execution's hostname (execution_owner).

GPU Metrics (via DCGM):
- gpuUtilizationPercent: GPU utilization percentage (0-100)
- gpuMemoryUtilizationPercent: GPU memory utilization percentage (0-100)
- gpuTemperatureCelsius: GPU temperature in Celsius
- gpuPowerWatt: GPU power draw in watts
- gpuPowerLimitWatt: GPU power limit in watts
- gpuClockSmMhz: GPU SM clock speed in MHz
- gpuClockMemMhz: GPU memory clock speed in MHz
- gpuPcieThroughputRxBytesPerSec: PCIe receive throughput in bytes/sec
- gpuPcieThroughputTxBytesPerSec: PCIe transmit throughput in bytes/sec

System Metrics:
- systemRamTotalBytes: Total system RAM in bytes
- systemRamUsedBytes: Used system RAM in bytes
- systemCpuUsagePercent: CPU usage percentage (0-100)



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/external/execution/{execution_id}/metrics
openapi: 3.1.0
info:
  title: Lyceum Cloud API
  version: 0.1.0
servers:
  - url: https://api.lyceum.technology
    description: Production
security:
  - bearerAuth: []
paths:
  /api/v2/external/execution/{execution_id}/metrics:
    get:
      tags:
        - Executions
      summary: Get execution metrics
      description: >-
        Get GPU and system metrics from Prometheus for a specific execution.


        This endpoint queries Grafana Cloud's Prometheus for GPU and system
        metrics

        associated with the execution's hostname (execution_owner).


        GPU Metrics (via DCGM):

        - gpuUtilizationPercent: GPU utilization percentage (0-100)

        - gpuMemoryUtilizationPercent: GPU memory utilization percentage (0-100)

        - gpuTemperatureCelsius: GPU temperature in Celsius

        - gpuPowerWatt: GPU power draw in watts

        - gpuPowerLimitWatt: GPU power limit in watts

        - gpuClockSmMhz: GPU SM clock speed in MHz

        - gpuClockMemMhz: GPU memory clock speed in MHz

        - gpuPcieThroughputRxBytesPerSec: PCIe receive throughput in bytes/sec

        - gpuPcieThroughputTxBytesPerSec: PCIe transmit throughput in bytes/sec


        System Metrics:

        - systemRamTotalBytes: Total system RAM in bytes

        - systemRamUsedBytes: Used system RAM in bytes

        - systemCpuUsagePercent: CPU usage percentage (0-100)
      operationId: >-
        get_execution_metrics_api_v2_external_execution__execution_id__metrics_get
      parameters:
        - name: execution_id
          in: path
          required: true
          schema:
            type: string
            title: Execution Id
        - name: start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: ISO 8601 start timestamp (defaults to execution start_time)
            title: Start
          description: ISO 8601 start timestamp (defaults to execution start_time)
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              ISO 8601 end timestamp (defaults to execution end_time or current
              time)
            title: End
          description: >-
            ISO 8601 end timestamp (defaults to execution end_time or current
            time)
        - name: step
          in: query
          required: false
          schema:
            type: string
            description: Query resolution (e.g., '5s', '15s', '1m')
            default: 15s
            title: Step
          description: Query resolution (e.g., '5s', '15s', '1m')
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionMetricsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ExecutionMetricsResponse:
      properties:
        executionId:
          type: string
          title: Executionid
        hostname:
          type: string
          title: Hostname
        timeRange:
          $ref: '#/components/schemas/TimeRange'
        gpuUtilizationPercent:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Gpuutilizationpercent
        gpuMemoryUtilizationPercent:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Gpumemoryutilizationpercent
        gpuTemperatureCelsius:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Gputemperaturecelsius
        gpuPowerWatt:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Gpupowerwatt
        gpuPowerLimitWatt:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Gpupowerlimitwatt
        gpuClockSmMhz:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Gpuclocksmmhz
        gpuClockMemMhz:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Gpuclockmemmhz
        gpuPcieThroughputRxBytesPerSec:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Gpupciethroughputrxbytespersec
        gpuPcieThroughputTxBytesPerSec:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Gpupciethroughputtxbytespersec
        systemRamTotalBytes:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Systemramtotalbytes
        systemRamUsedBytes:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Systemramusedbytes
        systemCpuUsagePercent:
          items:
            $ref: '#/components/schemas/MetricDataPoint'
          type: array
          title: Systemcpuusagepercent
      type: object
      required:
        - executionId
        - hostname
        - timeRange
        - gpuUtilizationPercent
        - gpuMemoryUtilizationPercent
        - gpuTemperatureCelsius
        - gpuPowerWatt
        - gpuPowerLimitWatt
        - gpuClockSmMhz
        - gpuClockMemMhz
        - gpuPcieThroughputRxBytesPerSec
        - gpuPcieThroughputTxBytesPerSec
        - systemRamTotalBytes
        - systemRamUsedBytes
        - systemCpuUsagePercent
      title: ExecutionMetricsResponse
      description: Response model for execution metrics (GPU and system).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TimeRange:
      properties:
        start:
          type: string
          title: Start
        end:
          type: string
          title: End
      type: object
      required:
        - start
        - end
      title: TimeRange
      description: Time range for the metrics query.
    MetricDataPoint:
      properties:
        timestamp:
          type: string
          title: Timestamp
        value:
          type: number
          title: Value
      type: object
      required:
        - timestamp
        - value
      title: MetricDataPoint
      description: Single metric data point with timestamp and value.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Pass an API key (prefixed `lk_`) or a JWT access token as a bearer
        token. Generate API keys in the dashboard at
        https://dashboard.lyceum.technology/api-keys.

````