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

# Get system and model inference metrics

> Returns a unified snapshot of live system resource metrics (CPU, memory) and per-model moving averages for all pipeline stages (last 100 requests).




## OpenAPI

````yaml /Ubuntu/ai-workflows/api-specs/llm-vlm-service/openapi.yaml get /v1/metrics
openapi: 3.0.3
info:
  title: LLM-VLM GenAI Microservice APIs
  description: >-
    These REST APIs provide the capability to run inference on Qualcomm
    Dragonwing devices.
  version: 1.0.0
servers:
  - url: http://{device-ip}:{device-port}/
    description: LLM-VLM Microservice API Server
    variables:
      device-ip:
        description: >-
          IP address and port of the host device running the LLM-VLM
          Microservice API
        default: localhost
      device-port:
        default: '9001'
security: []
paths:
  /v1/metrics:
    get:
      tags:
        - Metrics
      summary: Get system and model inference metrics
      description: >
        Returns a unified snapshot of live system resource metrics (CPU, memory)
        and per-model moving averages for all pipeline stages (last 100
        requests).
      operationId: getMetrics
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
components:
  schemas:
    MetricsResponse:
      type: object
      title: Metrics Response
      description: >-
        Unified snapshot of system resource metrics and per-model inference
        metrics.
      properties:
        system:
          $ref: '#/components/schemas/SystemMetrics'
        models:
          type: object
          description: >
            Map of model ID to its moving-average inference metrics. Empty
            object if no requests have been processed yet.
          additionalProperties:
            $ref: '#/components/schemas/ModelInferenceMetrics'
      required:
        - system
        - models
    SystemMetrics:
      type: object
      title: System Metrics
      description: Live system resource utilization.
      properties:
        cpu_usage_percent:
          type: number
          format: float
          description: Current CPU utilization (0–100).
        memory_total_gb:
          type: number
          format: float
          description: Total system memory in GB.
        memory_used_gb:
          type: number
          format: float
          description: Used system memory in GB.
        memory_free_gb:
          type: number
          format: float
          description: Available system memory in GB.
        memory_usage_percent:
          type: number
          format: float
          description: Memory utilization percentage (0–100).
      required:
        - cpu_usage_percent
        - memory_total_gb
        - memory_used_gb
        - memory_free_gb
        - memory_usage_percent
    ModelInferenceMetrics:
      type: object
      title: Model Inference Metrics
      description: >
        Moving-average pipeline-stage metrics for a single model (last 100
        requests). All avg_* fields are null until at least one request has been
        processed.
      properties:
        avg_preprocessing_time_ms:
          type: number
          format: float
          nullable: true
          description: >
            Pre-processing stage — average image encode/resize time in ms.
            Present only for VLM models; null for LLM models.
        avg_ttft_ms:
          type: number
          format: float
          nullable: true
          description: |
            VLM/LLM Inference Start — average Time to First Token in ms.
        avg_tokens_per_second:
          type: number
          format: float
          nullable: true
          description: >
            VLM/LLM Inference Steady-State — average token generation rate
            (tokens/sec).
        avg_stream_latency_ms:
          type: number
          format: float
          nullable: true
          description: |
            Token Streaming — average inter-token stream latency in ms.
        avg_total_pipeline_latency_ms:
          type: number
          format: float
          nullable: true
          description: |
            End-to-End — average total pipeline latency in ms.
        total_requests:
          type: integer
          description: Total number of requests processed for this model (all time).
      required:
        - total_requests

````