npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@shawn777/vscode-cpu-monitor

v1.2.0

Published

Monitor and kill VS Code zombie processes with high CPU usage

Downloads

34

Readme

VSCode CPU Monitor

A Node.js process monitor designed to solve the VS Code high CPU usage problem.

VS Code's Code Helper (Plugin) process often becomes a zombie process with extremely high CPU usage (90%+), causing system lag and battery drain. This tool automatically detects and terminates such runaway processes.

Installation

npm

npm i -g @shawn777/vscode-cpu-monitor

Homebrew (macOS/Linux)

brew tap xylvxy/vscode-cpu-monitor https://github.com/xylvxy/vscode-cpu-monitor.git
brew install vscode-cpu-monitor

Features

Core Features

  1. Process Monitoring - Periodically scan system processes and detect CPU usage
  2. Zombie Process Detection - Identify processes with abnormally high CPU usage
  3. Auto Termination - Kill processes that meet the termination criteria
  4. Watch List - Only monitor processes in the watch list to avoid killing critical system processes

Watch List

Initial watch list:

Code Helper (Plugin)

Configuration

| Option | Description | Default | |--------|-------------|---------| | cpuThreshold | CPU usage threshold (%) | 80 | | minRunTime | Minimum run time (s) | 600 | | cpuHitCount | Consecutive CPU threshold hits | 3 | | checkInterval | Check interval (ms) | 60000 | | watchList | Process watch list | See above |

White List

Processes in the white list will never be terminated, even if they match the watch list and exceed resource thresholds. Configuration includes common processes and platform-specific system processes.

Default White List:

| Category | Processes | |----------|-----------| | Common | node, npm, git | | macOS | launchd, kernel_task, WindowServer, Finder, Dock, etc. | | Linux | systemd, init, kthreadd, sshd, cron, etc. | | Windows | System, csrss, svchost, explorer, dwm, etc. |

Termination Rules

A process will be terminated only when ALL of the following conditions are met:

  1. In watch list - Process name matches any item in watchList
  2. Not in white list - Process is not protected by the white list
  3. Run time threshold - Running time >= minRunTime (avoids killing newly started processes)
  4. Resource threshold exceeded:
    • CPU exceeds cpuThreshold for cpuHitCount consecutive checks

Notes:

  • CPU uses consecutive hit counting to avoid false kills from temporary spikes
  • CPU counter resets automatically when CPU returns to normal

Execution Flow

  1. Scan system processes at configured interval
  2. Filter processes matching the watch list
  3. Skip processes in the white list
  4. Check CPU usage
  5. Kill processes exceeding thresholds
  6. Log all actions

Usage

vscode-cpu-monitor [options]

Options

| Option | Description | |--------|-------------| | -l, --log [date] | View logs (default: today, format: YYYY-MM-DD) | | -s, --stop | Stop the background daemon | | -h, --help | Show help message |

Examples

# Start monitor in background (default)
vscode-cpu-monitor

# View today's logs
vscode-cpu-monitor -l

# View logs for specific date
vscode-cpu-monitor -l 2024-01-15

# Stop background daemon
vscode-cpu-monitor -s

Logging

  • Log directory: log/
  • Daily log files: YYYY-MM-DD.log
  • Output to both console and file

Log Levels:

| Level | Description | |-------|-------------| | INFO | General information (startup, process discovery) | | WARN | Warnings (CPU threshold exceeded) | | ERROR | Errors (operation failed) | | KILL | Termination records |

Log Format:

[2026/2/12 14:05:15] [INFO] === Code Monitor Started ===
[2026/2/12 14:05:15] [WARN] PID: 8888, CPU: 98.8% exceeded threshold 80%
[2026/2/12 14:05:15] [KILL] PID: 8888, Command: Code Helper (Plugin)...

Tech Stack

  • Node.js
  • Supported Platforms: macOS / Linux / Windows

Platform Support

| Platform | Get Processes | Kill Process | |----------|---------------|--------------| | macOS | ps -eo pid,%cpu,rss,etime,command | kill -9 | | Linux | ps -eo pid,%cpu,rss,etime,command | kill -9 | | Windows | PowerShell Get-Process | taskkill /F /PID |