[PR #9392] Server: Add active inference status to ollama ps #18213

Open
opened 2026-04-16 06:28:32 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9392
Author: @ankh2054
Created: 2/27/2025
Status: 🔄 Open

Base: mainHead: feature/active-inference-status


📝 Commits (2)

  • be14a4c Add active inference status to ollama ps command
  • 444a67c Update api.md

📊 Changes

4 files changed (+19 additions, -3 deletions)

View changed files

📝 api/types.go (+1 -0)
📝 cmd/cmd.go (+10 -2)
📝 docs/api.md (+2 -1)
📝 server/routes.go (+6 -0)

📄 Description

Each runnerRef object contains information about a loaded model, including its reference count (refCount), which indicates how many active requests are using the model.
When a model is actively performing inference, its refCount is greater than 0. When it's idle but loaded, the refCount is 0.
We updated ollama ps to show whether model is active or not using refCount.

Example below:

user@unknown ~/ollama (feature/active-inference-status)> ./ollama ps
NAME              ID              SIZE      PROCESSOR    ACTIVE    UNTIL              
deepseek-r1:7b    0a8c26691023    6.0 GB    100% GPU     Yes       4 minutes from now    
user@unknown ~/ollama (feature/active-inference-status)> ./ollama ps
NAME              ID              SIZE      PROCESSOR    ACTIVE    UNTIL              
deepseek-r1:7b    0a8c26691023    6.0 GB    100% GPU     No        4 minutes from now

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/9392 **Author:** [@ankh2054](https://github.com/ankh2054) **Created:** 2/27/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/active-inference-status` --- ### 📝 Commits (2) - [`be14a4c`](https://github.com/ollama/ollama/commit/be14a4c75d2f4e029078eb89cce95fa9702bb111) Add active inference status to ollama ps command - [`444a67c`](https://github.com/ollama/ollama/commit/444a67cffa54436164ac44a110db9ebc9a2603be) Update api.md ### 📊 Changes **4 files changed** (+19 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+1 -0) 📝 `cmd/cmd.go` (+10 -2) 📝 `docs/api.md` (+2 -1) 📝 `server/routes.go` (+6 -0) </details> ### 📄 Description Each runnerRef object contains information about a loaded model, including its reference count (refCount), which indicates how many active requests are using the model. When a model is actively performing inference, its refCount is greater than 0. When it's idle but loaded, the refCount is 0. We updated ollama ps to show whether model is active or not using refCount. Example below: ``` user@unknown ~/ollama (feature/active-inference-status)> ./ollama ps NAME ID SIZE PROCESSOR ACTIVE UNTIL deepseek-r1:7b 0a8c26691023 6.0 GB 100% GPU Yes 4 minutes from now user@unknown ~/ollama (feature/active-inference-status)> ./ollama ps NAME ID SIZE PROCESSOR ACTIVE UNTIL deepseek-r1:7b 0a8c26691023 6.0 GB 100% GPU No 4 minutes from now ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 06:28:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#18213