~/tools / Run a local LLM on your server / Ollama Log Reader

Ollama Log Reader — Read an Ollama server log: memory, GPU layers, context, speed, warnings

Paste the server log of Ollama, from server.log, journalctl or docker logs, and the tool picks out what matters: how much memory each model load took and where (weights, KV cache, compute buffers, per CPU or GPU), how many layers went to the GPU, the context length, the requests and their status, the prompt and generation speed, and every warning, with an explanation. It shows when a prompt was cut to fit the context, when a model did not fit in memory, and when Ollama reloaded a model. Nothing leaves your browser.

Where to find the log

From Ollama's troubleshooting page. On Windows, the newest log is server.log in that folder.

# macOS
cat ~/.ollama/logs/server.log

# Linux (systemd)
journalctl -u ollama --no-pager

# Docker
docker logs <container-name>

# Windows
explorer %LOCALAPPDATA%\Ollama

Read 76 of 77 lines.

  • line 23The context is 4096 tokens, shorter than the 32768 the model supports. Longer inputs need a larger num_ctx or OLLAMA_CONTEXT_LENGTH, and more memory for the KV cache.
  • line 43The context is 256 tokens, shorter than the 32768 the model supports. Longer inputs need a larger num_ctx or OLLAMA_CONTEXT_LENGTH, and more memory for the KV cache.
  • line 49The prompt had 633 tokens and did not fit in the context. Ollama kept the first 4 tokens and the end of the prompt and dropped the rest, leaving 130 tokens. Raise num_ctx, shorten the prompt, or send truncate set to false to get an error instead.
  • line 53A request of 633 tokens did not fit in the context of 256 tokens and was rejected (this happens when truncate is false). Raise num_ctx or shorten the input.
  • line 55Ollama stopped llama-server and started it again right away to load the model with other settings, for example another num_ctx. This is not a crash.
  • line 58num_ctx 65536 is longer than the context the model was trained for, so Ollama used 32768.
  • Failed requests: 400 POST /api/chat, 404 POST /api/chat

Server

Version
0.40.11
Address
[::]:11434
Devices
cpu cpu (1.9 GiB / 1.9 GiB)
Default context length
4096

Settings (environment variables)

OLLAMA_HOST
http://0.0.0.0:11434
OLLAMA_CONTEXT_LENGTH
0 (0 = default)
OLLAMA_NUM_PARALLEL
1
OLLAMA_MAX_LOADED_MODELS
0 (0 = default)
OLLAMA_KEEP_ALIVE
5m0s
OLLAMA_FLASH_ATTENTION
false

Model loads

Load 1 at 2026-11-07T08:32:08.625Z line 14

Model
Qwen2.5 0.5B Instruct · Q4_K - Medium · 373.71 MiB (6.35 BPW) · sha256-c5396e06af29
Context length
4096 (trained for 32768)
Parallel requests
1
Weights
512 MiB
KV cache
48.0 MiB (f16)
Compute buffers
41.3 MiB
Total
601 MiB
By device
CPU 393 MiB, CPU_REPACK 208 MiB
System memory
1638 MiB free of 1946 MiB, swap 777 MiB free
Start-up time
1.27 s

Load 2 at 2026-11-07T08:32:10.384Z line 34

Model
Qwen2.5 0.5B Instruct · Q4_K - Medium · 373.71 MiB (6.35 BPW) · sha256-c5396e06af29
Context length
256 (trained for 32768)
Parallel requests
1
Weights
512 MiB
KV cache
3.0 MiB (f16)
Compute buffers
18.8 MiB
Total
533 MiB
By device
CPU 325 MiB, CPU_REPACK 208 MiB
System memory
1638 MiB free of 1946 MiB, swap 763 MiB free
Start-up time
1.02 s

Load 3 at 2026-11-07T08:32:12.223Z line 59

Model
Qwen2.5 0.5B Instruct · Q4_K - Medium · 373.71 MiB (6.35 BPW) · sha256-c5396e06af29
Context length
32768 (trained for 32768)
Parallel requests
1
Weights
512 MiB
KV cache
384 MiB (f16)
Compute buffers
139 MiB
Total
1034 MiB
By device
CPU 826 MiB, CPU_REPACK 208 MiB
System memory
1638 MiB free of 1946 MiB, swap 764 MiB free
Start-up time
1.02 s

Speed reported by llama-server

Prompt tokens processedPrompt speedGenerated tokensGeneration speed
35217.5 tokens/s759.9 tokens/s
130227.3 tokens/s1194.8 tokens/s
30202.7 tokens/s562.7 tokens/s

Requests

TimeStatusDurationRequest
2026/11/07 - 08:31:422000.007 sGET /api/version
2026/11/07 - 08:32:0020017.49 sPOST /api/pull
2026/11/07 - 08:32:002000.040 sGET /api/tags
2026/11/07 - 08:32:102001.62 sPOST /api/chat
2026/11/07 - 08:32:122001.89 sPOST /api/chat
2026/11/07 - 08:32:124000.005 sPOST /api/chat
2026/11/07 - 08:32:132001.31 sPOST /api/chat
2026/11/07 - 08:32:134040.002 sPOST /api/chat

When a prompt does not fit, Ollama cuts it to num_ctx − max((num_ctx − num_keep) ÷ 2, 1) tokens: about half of the context, so that there is room left for the answer. The prompt tokens in the speed table count only the tokens that were not in the cache.

llama-server does not count the first generated token when it computes the generation speed, so its value is a little lower than eval_count divided by eval_duration in the API response.

The log format changes from release to release. The tool follows Ollama v0.40.15 and the llama.cpp build it uses, and skips lines it does not know.

Messages from Ollama's source code (v0.40.15) and llama.cpp, checked against real logs from Ollama 0.40.11 on macOS and on Linux on 2026-11-07. Ollama: Troubleshooting

Everything is done in your browser. The tool connects to nothing. Logs can contain file paths, IP addresses and model names.

When Ollama is slow, answers ignore the start of a long prompt, or a request fails with a 500 error, the explanation is usually in the server log. The log mixes Ollama's own lines (time=… level=… msg=…), one line per HTTP request ([GIN] …), and the output of llama-server, the llama.cpp program that Ollama runs to load each GGUF model. This tool reads all three. For each model load it shows the context length (-c), the number of parallel requests (-np), the model's file type and size, the context length it was trained for, how many layers were offloaded to the GPU, and the memory for the weights, the KV cache and the compute buffers, per device. It also lists the requests with their status and duration, and the prompt and generation speed that llama-server prints after each request. Then it explains what went wrong, using the messages in Ollama's source code (v0.40.15). When a prompt does not fit in the context, Ollama keeps the first num_keep tokens and the end of the prompt, and drops what is in between, until the prompt takes about half of the context: in our test, a prompt of 633 tokens with num_ctx 256 was cut to 130 tokens. With truncate set to false, the same request was rejected with a 400 error. A num_ctx above the length the model was trained for is lowered to that length. When a model does not fit in memory, loading fails: in our test on Linux with 1.9 GiB of memory and no GPU, qwen2.5:7b needed 4,460 MiB for its weights, llama-server was stopped with signal: killed, and the request returned 500. A line saying that llama-server terminated, followed right away by a new start, means that Ollama was loading the model again with other settings, not that it crashed. The format of the log changes from release to release; the tool reads the lines it knows and skips the rest. We checked it against real logs from Ollama 0.40.11 on macOS (Apple M1) and on Linux in Docker, without a GPU.

The core logic of this tool is open source under the MIT License. github.com/seigo5555/toolkitbox-lib/src/ollama-log.ts

Use Cases

  • Find out why a long prompt seems to be ignored, or why a request failed with 400 or 500
  • See how much memory a model really used, and whether it ran on the GPU, the CPU or both
  • Check which context length and settings the server used, before you buy a bigger VPS

Usage

  1. Get the log: cat ~/.ollama/logs/server.log on macOS, journalctl -u ollama --no-pager on Linux, or docker logs with the container name.
  2. Paste it. Lines that start with a journalctl or docker time stamp are read too.
  3. Read the warnings first, then the model loads, the speed and the requests.

FAQ

Why does my model ignore the beginning of a long prompt?

If the log has a "truncating input prompt" line, the prompt did not fit in the context. Ollama kept the first num_keep tokens and the end, and dropped the middle, until the prompt took about half of the context. Raise num_ctx (or OLLAMA_CONTEXT_LENGTH), shorten the prompt, or send truncate set to false, so that Ollama returns an error instead of cutting.

What does "signal: killed" mean?

llama-server was stopped from outside. In our test on Linux, this happened while a model that did not fit in memory was loading, and the request returned 500. If a new "starting llama-server" line follows within two seconds, Ollama stopped the old process itself to load the model again with other settings.

Why is the generation speed in the log lower than eval_count divided by eval_duration?

llama-server does not count the first generated token, because it comes from the last step of prompt processing, so it divides by one token less. In our test, 7 tokens in 675.82 ms were reported as 8.88 tokens per second, while 7 divided by the same time gives 10.4.

How do I see whether the model ran on the GPU?

Look at "layers on the GPU" for the model load. All layers on the GPU means the model ran there completely; some layers means that the rest ran on the CPU. While the model is loaded, ollama ps shows the same split in the PROCESSOR column.

Why are some lines not read?

The tool reads Ollama's own lines, the request lines and the llama-server lines that matter for memory, context and speed. Other lines, such as the list of model metadata, are skipped. The format changes between releases, so lines from a much older or newer version may not be recognized.

Is my log sent anywhere?

No. The log is read in your browser. Logs can contain file paths, IP addresses and the names of your models, so be careful where else you paste them.

Related articles

Related