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

# Get CVM system stats

> Returns live system metrics (CPU, memory, disk) from the running CVM.



## OpenAPI

````yaml /openapi.json get /api/v1/cvms/{cvm_id}/stats
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/cvms/{cvm_id}/stats:
    get:
      tags:
        - CVMs
      summary: Get CVM system stats
      description: Returns live system metrics (CPU, memory, disk) from the running CVM.
      operationId: handle_get_cvm_stats_api_v1_cvms__cvm_id__stats_get
      parameters:
        - name: cvm_id
          in: path
          required: true
          schema:
            type: string
            title: Cvm Id
      responses:
        '200':
          description: System stats (may be partial if CVM offline)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CvmSystemInfo'
        '401':
          description: Authentication required
        '403':
          description: CVM not in workspace
        '404':
          description: CVM not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CvmSystemInfo:
      properties:
        is_online:
          type: boolean
          title: Is Online
        is_public:
          type: boolean
          title: Is Public
          default: true
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        sysinfo:
          anyOf:
            - $ref: '#/components/schemas/SystemInfo'
            - type: 'null'
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        in_progress:
          type: boolean
          title: In Progress
          default: false
        boot_progress:
          anyOf:
            - type: string
            - type: 'null'
          title: Boot Progress
        boot_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Boot Error
      type: object
      required:
        - is_online
      title: CvmSystemInfo
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SystemInfo:
      properties:
        os_name:
          type: string
          title: Os Name
        os_version:
          type: string
          title: Os Version
        kernel_version:
          type: string
          title: Kernel Version
        cpu_model:
          type: string
          title: Cpu Model
        num_cpus:
          type: integer
          title: Num Cpus
        total_memory:
          type: integer
          title: Total Memory
        available_memory:
          type: integer
          title: Available Memory
        used_memory:
          type: integer
          title: Used Memory
        free_memory:
          type: integer
          title: Free Memory
        total_swap:
          type: integer
          title: Total Swap
        used_swap:
          type: integer
          title: Used Swap
        free_swap:
          type: integer
          title: Free Swap
        uptime:
          type: integer
          title: Uptime
        loadavg_one:
          type: integer
          title: Loadavg One
        loadavg_five:
          type: integer
          title: Loadavg Five
        loadavg_fifteen:
          type: integer
          title: Loadavg Fifteen
        disks:
          items:
            $ref: '#/components/schemas/DiskInfo'
          type: array
          title: Disks
      type: object
      required:
        - os_name
        - os_version
        - kernel_version
        - cpu_model
        - num_cpus
        - total_memory
        - available_memory
        - used_memory
        - free_memory
        - total_swap
        - used_swap
        - free_swap
        - uptime
        - loadavg_one
        - loadavg_five
        - loadavg_fifteen
        - disks
      title: SystemInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DiskInfo:
      properties:
        name:
          type: string
          title: Name
        mount_point:
          type: string
          title: Mount Point
        total_size:
          type: integer
          title: Total Size
        free_size:
          type: integer
          title: Free Size
      type: object
      required:
        - name
        - mount_point
        - total_size
        - free_size
      title: DiskInfo

````