Skip to content

CodeAndCanvas728/LLM-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM Tracker

A lightweight, native macOS menubar application designed to monitor running Large Language Model (LLM) and MLX servers. Keep track of which models are currently loaded into memory, which ports they are listening on, and effortlessly free up resources by terminating instances directly from your menubar.

LLM Tracker Logo

Features

  • Native macOS UI: Built entirely with SwiftUI and MenuBarExtra for a minimal memory footprint and seamless system integration.
  • Dynamic Model Detection: Parses active processes and polls internal APIs (like Ollama's /api/ps and oMLX's /api/status) to accurately report which models are currently consuming RAM/VRAM.
  • Instant Process Termination: Features a one-click stop button to forcefully terminate (kill -9) active servers and instantly free up memory.
  • Adaptive Menubar Icon: Uses a template rendering approach to adapt automatically to macOS Dark Mode and Light Mode.

Supported Servers

The tracker actively listens for the following local servers:

Installation & Build

LLM Tracker is built natively using Swift. No Xcode project or complex build system is required—everything is managed via a simple Makefile.

Prerequisites

  • macOS 13.0 (Ventura) or later
  • Xcode Command Line Tools (provides swiftc and make)

Building from Source

  1. Clone the repository:

    git clone https://github.com/yourusername/LLM-tracker.git
    cd LLM-tracker
  2. Compile and bundle the application:

    make
  3. Run the application:

    make run

(Optional) Install Permanently

Once built, simply drag the generated LLMTracker.app bundle into your /Applications folder to keep it installed permanently on your Mac.

How It Works Under the Hood

  • Process Scanning: The app periodically polls macOS using ps -eo pid,ppid,command -ww to find running processes matching known LLM server keywords.
  • Port Mapping: It precisely maps these processes to active network listening ports using lsof.
  • API Polling & Parsing:
    • For Ollama, it polls http://127.0.0.1:<port>/api/ps to view VRAM allocation.
    • For oMLX, it polls the internal http://127.0.0.1:<port>/api/status endpoint to extract dynamically loaded models.
    • For standard MLX-LM implementations, it parses the --model flag directly from the lengthy launch command string.

License

MIT License

About

Lightweight tracker and manager for active LLM models and server instances

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors