[PR #6613] [CLOSED] cli: Add watch mode and filtering to 'ps' command #12168

Closed
opened 2026-04-12 23:51:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/6613
Author: @Yash-1511
Created: 9/3/2024
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • 04b188b cli: Enhance 'ps' command with watch mode and filtering

📊 Changes

1 file changed (+82 additions, -20 deletions)

View changed files

📝 cmd/cmd.go (+82 -20)

📄 Description

This PR enhances the ollama ps command by adding a watch mode and filtering capabilities. These additions improve the user experience when monitoring running models, especially in dynamic environments.

Key changes:

  • Implemented a -w, --watch flag for continuous monitoring
  • Added an -i, --interval flag to set the refresh rate in watch mode
  • Introduced a -f, --filter flag for filtering models by name
  • Ensured the display updates correctly in watch mode, including the "UNTIL" column

Usage Guide

The enhanced ollama ps command now supports the following use cases:

  1. Basic usage (list running models once):

    ollama ps
    
  2. Watch mode with default 5-second interval:

    ollama ps -w
    
  3. Watch mode with custom interval (e.g., 10 seconds):

    ollama ps -w -i 10s
    
  4. Filter models by name:

    ollama ps -f "llama"
    
  5. Combine watch mode and filtering:

    ollama ps -w -f "gpt" -i 15s
    

🔄 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/6613 **Author:** [@Yash-1511](https://github.com/Yash-1511) **Created:** 9/3/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`04b188b`](https://github.com/ollama/ollama/commit/04b188bca4ce0331146a83fddee870036dd4f453) cli: Enhance 'ps' command with watch mode and filtering ### 📊 Changes **1 file changed** (+82 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+82 -20) </details> ### 📄 Description This PR enhances the `ollama ps` command by adding a watch mode and filtering capabilities. These additions improve the user experience when monitoring running models, especially in dynamic environments. Key changes: - Implemented a `-w, --watch` flag for continuous monitoring - Added an `-i, --interval` flag to set the refresh rate in watch mode - Introduced a `-f, --filter` flag for filtering models by name - Ensured the display updates correctly in watch mode, including the "UNTIL" column # Usage Guide The enhanced `ollama ps` command now supports the following use cases: 1. Basic usage (list running models once): ``` ollama ps ``` 2. Watch mode with default 5-second interval: ``` ollama ps -w ``` 3. Watch mode with custom interval (e.g., 10 seconds): ``` ollama ps -w -i 10s ``` 4. Filter models by name: ``` ollama ps -f "llama" ``` 5. Combine watch mode and filtering: ``` ollama ps -w -f "gpt" -i 15s ``` --- <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-12 23:51:06 -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#12168