Samples
List running models
See which models are currently loaded:Monitor model expiration
Check when models will unload from memory:Check VRAM usage
See how much video memory models are consuming:Connect to specific host
Monitor models on a remote Ollama server:Total resource usage
Calculate total VRAM used by all running models:Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
host | TEXT | NULL | ✖ | Ollama server URL (defaults to http://localhost:11434) |
verbose | BOOLEAN | FALSE | ✖ | Enable verbose logging for debugging |
Returns
TABLE: A table with the following columns:
| Column | Type | Description |
|---|---|---|
name | TEXT | Model name (e.g., llama2, mistral:7b) |
model | TEXT | Full model identifier |
size | BIGINT | Model size in bytes |
digest | TEXT | SHA256 digest of the model |
parent_model | TEXT | Parent model if this is a derivative |
format | TEXT | Model format (typically gguf) |
family | TEXT | Model family (e.g., llama, mistral) |
families | JSONB | Array of model families |
parameter_size | TEXT | Number of parameters (e.g., 7B, 13B) |
quantization_level | TEXT | Quantization level (e.g., Q4_0, Q5_K_M) |
expires_at | TIMESTAMPTZ | When the model will unload from memory |
size_vram | BIGINT | VRAM usage in bytes |
Related functions
ollama_list_models(): see all installed modelsollama_embed(): generate embeddings with a modelollama_chat_complete(): chat with a model