A local model server is a small production system. It holds weights in VRAM, serves a household or a team, and decides on its own whether the next request is answered or queued. Once a second user, a chat UI and a script point at the same port, the only way to know whether it is keeping up is to read what the server says about itself.
Key Takeaways
- llama.cpp’s
llama-serverv1.0.0 exposes live state on two endpoints that need no configuration,GET /propsandGET /slots, and publishes Prometheus metrics only when it is started with--metrics(llama.cpp server README at v1.0.0). GET /slotsis the free-slot check. Adding?fail_on_no_slot=1makes it answer 503 when no slot is free, which turns a status page into an alert.- vLLM v0.34.0 serves
/metricson its OpenAI compatible server with no flag. Its general metrics set, generated from vllm/v1/metrics/loggers.py, defines 42vllm:series covering request counters, queue-time histograms and a KV-cache gauge, some of them only registered when a feature is enabled, and other subsystems add their own on top (vLLM production metrics). - Ollama documents no metrics endpoint: its published OpenAPI specification lists 16 paths and none of them serves one.
GET /api/psgives a snapshot instead (Ollama OpenAPI specification). - LM Studio exposes
lms psandGET /api/v1/modelsfor state, and its per-request stats arrive in the response body rather than as a series you can graph. - Counters and gauges are not interchangeable. llama.cpp publishes
llamacpp:prompt_tokens_totalas a Counter andllamacpp:prompt_tokens_secondsas a Gauge, and applying a rate to the wrong one produces a number that looks reasonable and means nothing. - None of the four runtimes documents a GPU temperature or a power figure. The 15 metrics in the llama.cpp table, the vLLM general series and the Ollama and LM Studio field lists all cover request and model state, so hardware telemetry lives somewhere else entirely.
What each runtime exposes
| Runtime | Live state you can read | Prometheus exporter | What you do not get |
|---|---|---|---|
llama.cpp llama-server | GET /props (model path, slot count, sleep state) and GET /slots (per-slot processing state and token counters), both on by default | GET /metrics, and only when the server is started with --metrics | No driver-level GPU state such as temperature or power draw |
| Ollama | GET /api/ps (model size, size_vram, expires_at, context length, digest) and the ollama ps command | None in the API Ollama publishes: the OpenAPI specification lists 16 paths and none of them serves metrics | No counters and no history. Every call is a snapshot of the present |
| vLLM | The /metrics endpoint on the OpenAI compatible server, on by default | Yes, no flag required | Some series are opt-in behind their own flag, and metric names move between releases |
| LM Studio | lms ps (or lms ps --json) and GET /api/v1/models, whose loaded_instances carry the context length of each loaded model | None in either documented API: the v0 REST API lists five endpoints and the v1 API lists six | No time series. Per-request stats arrive in the response body instead |
All four answer a question straight away without extra configuration, and only two publish a series you can scrape. That difference decides the tooling: llama.cpp and vLLM can be handed to Prometheus, while Ollama and LM Studio have to be polled and stored by whatever you write around them.
llama.cpp: state now, metrics on request
The llama.cpp server README at tag v1.0.0, released 13 November 2026, documents three endpoints that matter, and they are switched differently.
GET /props is read-only unless the server was started with --props, which adds the ability to change global properties with POST. The response carries total_slots (the number of slots set by --parallel, which defaults to auto), model_path, chat_template, modalities and is_sleeping.
GET /slots is on by default and can be turned off with --no-slots. Each slot reports its id, id_task, n_ctx, an is_processing flag, the sampling parameters in force and the token counters n_decoded and n_remain. Adding ?fail_on_no_slot=1 makes the endpoint answer with status 503 when no slot is free, which turns it into a free-slot check rather than a status page.
GET /metrics is the odd one out. The README states that “This endpoint is only accessible if --metrics is set”, so a server started without the flag has no exporter at all. In router mode the endpoint also needs a model name, and a request without one returns 400 with “model name is missing from the request”.
The idle behaviour is worth folding into a health check. --sleep-idle-seconds is off by default, with -1 meaning disabled. When it is on and the server goes quiet, “the model and its associated memory (including the KV cache) are unloaded from RAM to conserve resources”, and the next request reloads the model. is_sleeping in the /props response says which state the server is in. The README also lists GET /health, GET /props, GET /models and GET /metrics as endpoints that are exempt from being counted as incoming tasks, so polling them will not wake a sleeping server or reset its idle timer.
The metric table itself is short, and it is worth reading in full because the types are the point. The 15 series cover prompt and generation tokens, request counts, decode calls and speculative-decoding counters: llamacpp:prompt_tokens_total is a Counter, llamacpp:prompt_tokens_seconds is a Gauge holding average prompt throughput in tokens per second, llamacpp:requests_processing and llamacpp:requests_deferred are Gauges, and llamacpp:n_tokens_max is a Counter recording the high watermark of the context size observed. Nothing in that table reports a temperature, a fan speed or a power draw.
vLLM: the richest exporter, with a moving target
vLLM publishes its metrics on /metrics on the OpenAI compatible server. The production metrics documentation starts a server with vllm serve and then scrapes the metrics endpoint on port 8000, with no flag needed for the core series.
Each series carries its own description in vllm/v1/metrics/loggers.py:
| Metric | Type | What it says |
|---|---|---|
vllm:num_requests_running | Gauge | ”Number of requests in model execution batches.” |
vllm:num_requests_waiting | Gauge | ”Number of requests waiting to be processed.” |
vllm:num_requests_waiting_by_reason | Gauge | ”Number of waiting requests by reason.” |
vllm:kv_cache_usage_perc | Gauge | ”KV-cache usage. 1 means 100 percent usage.” |
vllm:time_to_first_token_seconds | Histogram | How long the first token took |
vllm:request_queue_time_seconds | Histogram | How long a request sat before it was scheduled |
vllm:e2e_request_latency_seconds | Histogram | The whole request, end to end |
vllm:generation_tokens | Counter | ”Number of generation tokens processed.” |
vllm:request_success | Counter | ”Count of successfully processed requests.”, labelled by finished_reason |
vllm:prefix_cache_hits and vllm:prefix_cache_queries | Counters | Cached and queried tokens, so their ratio is the prefix cache hit rate |
The num_requests_waiting_by_reason series is the one worth knowing about: it splits the waiting count into reasons, and its documentation states that “Sum of all reasons equals vllm:num_requests_waiting.” The reason labels distinguish a request waiting for scheduling capacity from one deferred by a transient constraint, and those look identical in the plain waiting count while needing different fixes.
Some series are opt-in behind their own flags, so an empty panel does not always mean a broken server. Model Flops Utilization metrics require --enable-mfu-metrics, the KV block residency histograms require --kv-cache-metrics, and --custom-histogram-buckets replaces the default bucket boundaries of a named family of histograms. That last one is worth understanding before you use it, because the documentation warns that every bucket boundary creates an extra time series per metric and per label combination, and that long bucket lists inflate storage, scrape sizes and query costs.
The catch is that vLLM documents a deprecation policy for these names. The metrics documentation says that “when metrics are deprecated in version X.Y, they are hidden in version X.Y+1”, can be brought back with the --show-hidden-metrics-for-version=X.Y flag, and are then removed in version X.Y+2. Pin a dashboard to the version in use and check the release notes before upgrading, or a panel empties without raising an error. The runner comparison covers which server suits which setup, and local AI inference speed covers what throughput to expect once the numbers are flowing.
Ollama and LM Studio: state without a time series
Ollama’s /api/ps returns the running models with size, size_vram, context_length, the digest and an expires_at timestamp, documented as the “Time when the model will be unloaded” in the list running models documentation. The ollama ps command prints the same list and ollama stop <model> stops a running model, per the CLI reference.
The unloading rule is what makes Ollama’s numbers worth watching. The FAQ states that “By default models are kept in memory for 5 minutes before being unloaded”, and the keep_alive parameter on /api/generate and /api/chat overrides the OLLAMA_KEEP_ALIVE setting for that request. A duration string or a number of seconds sets the window, a negative number keeps the model resident and 0 unloads it as soon as the response is done.
With no metrics endpoint to scrape, the monitoring job is a poll. A scheduled job writing curl -s localhost:11434/api/ps into a JSONL file gives VRAM and unload history, and a small script that republishes those fields in Prometheus text format turns that into graphs.
LM Studio has the same shape with a different tool. lms ps prints the loaded models with their identifier, type, path, size and architecture, and lms ps --json returns the same list in machine-readable form, according to the LM Studio CLI documentation. The v0 REST API documentation notes that “The REST API includes enhanced stats such as Token / Second and Time To First Token (TTFT)”, but those stats arrive in the response to a request rather than as a series you can graph. The v1 API, released in LM Studio 0.4.0, adds model load and unload endpoints and nothing that changes the monitoring picture.
Wiring it up
For llama.cpp and vLLM the scrape is a few lines of Prometheus configuration:
scrape_configs:
- job_name: llama-cpp
metrics_path: /metrics
static_configs:
- targets: ['127.0.0.1:9931']
- job_name: llama-cpp-router
metrics_path: /metrics
params:
model: ['my-model']
static_configs:
- targets: ['127.0.0.1:9931']
The second job exists for router mode, where the model has to be named in the query string, which is what params is for.
Two rules save most dashboard debugging time. First, read the type. Counters get rate(), gauges get plotted as they are, and applying rate() to a gauge produces a number that looks reasonable and means nothing. The same distinction separates vLLM’s counters from its gauges. Second, name your own recording rules with your own prefix. Prometheus’s data model page reserves the colon for recording rules and states that “They SHOULD NOT be used by exporters or direct instrumentation”, yet llama.cpp and vLLM both publish colon-prefixed names. The names query fine, but a rule built on an exporter’s prefix inherits that exporter’s renaming schedule.
None of the four runtimes documents a temperature or a power figure. The llama.cpp metric table, the Ollama /api/ps schema, the vLLM series and the LM Studio model list all stick to request and model state, so hardware telemetry and runtime telemetry live in two separate places. If the server is dropping work because the model does not fit in memory, that is a different page: local AI out of memory covers the error strings and the settings that fix them.
What This Means
Monitoring a local model server is a solved problem for two of the four popular runtimes and a small scripting job for the other two. llama.cpp and vLLM both speak Prometheus natively, and the gap between them is mostly in what they choose to publish. llama.cpp keeps the surface to 15 series and makes the exporter opt-in; vLLM defines 42 general series, some of them conditional, and adds opt-in families on top.
The practical difference is that a llama.cpp dashboard needs one flag on the server, while an Ollama dashboard needs a poll job and a converter script. That is not a reason to prefer one runtime, but it is a reason to know which one you are running before you plan the alerting.
The other half is knowing what these numbers cannot tell you. Request counts, queue depth, token throughput and cache occupancy describe the workload the server is handling. They say nothing about the hardware underneath it, so a server that is thermally throttling can look identical to one running at full speed in every series on this page.
The Bottom Line
- Start llama-server with
--metricsand point Prometheus at it. vLLM needs nothing beyondvllm serve. - Ollama and LM Studio give a snapshot, not a series. Poll
/api/psorlms ps --jsonon a schedule and store the numbers yourself. - Three series cover most of it: requests in flight, requests waiting, and KV cache or VRAM usage. Everything else is detail until one of those three misbehaves.
- Pin the version. llama.cpp publishes its metric list in a README table rather than a versioned schema, and vLLM hides a deprecated metric one release after deprecating it. A dashboard written today is a dashboard written against one release.
Related on Intelligibberish
- Best Local LLM Runners - the inference engines this monitoring layer sits on top of
- Local AI Out of Memory: How to Fix It - the failure mode a queue dashboard will not explain
- Local AI Inference Speed - what throughput to expect before you build a panel around it
- Local LLM Privacy: What Each Runtime Actually Sends Home - the other half of running a server yourself
Our other local AI guides are under Local AI coverage.