Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 47 additions & 13 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,62 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
# Compiles the extension, lints it, and packages a VSIX to prove the published
# artifact would actually work.
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [10.x, 12.x]
node-version: [ 22.x, 24.x ]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: tsc -p $GITHUB_WORKSPACE
- uses: actions/checkout@v5

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: npm

- run: npm ci

- name: Compile
run: npm run compile

- name: Lint
run: npm run lint

- name: Test
run: npm test

- name: Package extension
run: npx --yes @vscode/vsce package --out system-vitals.vsix

# systeminformation was once listed as both a dependency and a
# devDependency, so vsce pruned it and shipped a VSIX with no
# node_modules at all. That build compiled, linted and packaged
# cleanly, and failed at activation on require('systeminformation').
# Only inspecting the artifact catches it.
- name: Verify the runtime dependency is bundled
run: |
if ! unzip -l system-vitals.vsix | grep -q 'node_modules/systeminformation/lib/'; then
echo "systeminformation is missing from the VSIX: the extension would fail on activation"
unzip -l system-vitals.vsix
exit 1
fi

- name: Upload VSIX
if: matrix.node-version == '22.x'
uses: actions/upload-artifact@v5
with:
name: system-vitals-vsix
path: system-vitals.vsix
2 changes: 2 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.vscode/**
.vscode-test/**
.claude/**
.github/**
out/test/**
out/**/*.map
src/**
Expand Down
32 changes: 23 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
# Change Log

## [1.0.7]
## [1.0.0]

First release of System Vitals, forked from [resmon](https://github.com/Njanderson/resmon) 1.0.7.

- Settings moved from the `resmon.*` namespace to `systemvitals.*`. If you are coming from resmon, your existing settings will not carry over and need to be set again. This keeps the two extensions independent when both are installed, rather than sharing one set of keys.
- Added GPU utilization and GPU memory monitoring on macOS, including Apple Silicon (M-series). Statistics are read from the IOKit registry via `ioreg`, which needs no elevated privileges. Both metrics hide themselves automatically on machines that do not report GPU statistics.
- Fixed `systeminformation` being pruned from the packaged extension, which produced a build that failed at activation once installed.
- Changed activation from `*` to `onStartupFinished`, so the extension no longer delays editor startup. This raises the minimum VS Code version to 1.53.
- Modernized the build: TypeScript 5, `@types/vscode` in place of the deprecated `vscode` module, and no `postinstall` hook.

## Inherited history

Releases below are from the upstream resmon project, retained for context.

### [1.0.7]
- Changed underlying CPU frequency API, added hiding battery/CPU temp information if the device lacks a battery/doesn't support CPU temp sensing, added some clarifications about CPU frequency behavior on Windows.

## [1.0.6]
### [1.0.6]
- Added DiskSpace, CPU Temperature. Adjusted battery icon.

## [1.0.5]
### [1.0.5]
- Refactored code heavily, addressed Github issue with memory.used versus memory.active.

## [1.0.4]
### [1.0.4]
- Added icon for store.

## [1.0.3]
### [1.0.3]
- Changed icons. Added choosable units.

## [1.0.2]
### [1.0.2]
- Actually properly added systeminformation as a real dependency.

## [1.0.1]
### [1.0.1]
- Properly added systeminformation as a real dependency

## [1.0.0]
- Initial release
### [1.0.0]
- Initial release
20 changes: 20 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# License

System Vitals is a fork of [resmon](https://github.com/Njanderson/resmon) by Nicholas Anderson, published to the VS Code Marketplace as `mutantdino.resourcemonitor`.

## Status of the upstream work

At the time this fork was made, the upstream project declared **no license**: it carries no `LICENSE` file, no `license` field in its `package.json`, and GitHub reports no detected license for the repository. Under default copyright, that means the original author retains all rights in the portions of this project that originate upstream, and grants no redistribution or modification rights.

This file records that situation honestly rather than asserting a license over work this fork does not own.

## Modifications

Changes made in this fork — including the macOS GPU monitoring support in `src/appleGpu.ts` and the related additions to `src/extension.ts` — are copyright © 2026 Sachin Sachdeva.

## What this means

Until the upstream project adopts an explicit license, the redistribution terms for this project as a whole are unresolved. Anyone intending to redistribute it, or to rely on it in a context where licensing matters, should treat that as an open question.

If you are the author of the upstream project and would like this fork changed, renamed, or taken down, please open an issue at
<https://github.com/sachinsachdeva/resmon/issues>.
89 changes: 42 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,63 @@
# Resource Monitor
# System Vitals

## Features

Display CPU frequency, usage, memory consumption, and battery percentage remaining within the VSCode status bar.

## Screenshots

![Disk space feature](images/disk_space_screenshot.png).

## Requirements

Just the system information node module.
Display CPU frequency and usage, GPU utilization, memory consumption, disk space, and battery percentage in the VS Code status bar — including **native Apple Silicon GPU monitoring**, which needs no elevated privileges.

## Extension Settings
> **A fork.** System Vitals is a fork of [resmon](https://github.com/Njanderson/resmon) by Nicholas Anderson, adding macOS GPU support and a modernized build. It is not affiliated with or endorsed by the original author. See [LICENSE.md](LICENSE.md) for the licensing situation, which is unresolved because the upstream project declares no license.

- `resmon.show.cpuusage`: Show CPU Usage. In Windows, this percentage is calculated with processor time, which doesn't quite match the task manager figure.
- `resmon.show.cpufreq`: Show CPU Frequency. This may just display a static frequency on Windows.
- `resmon.show.mem`: Show consumed and total memory as a fraction.
- `resmon.show.battery`: Show battery percentage remaining.
- `resmon.show.disk`: Show disk space information.
- `resmon.show.cputemp`: Show CPU temperature. May not work without the lm-sensors module on Linux. May require running VS Code as admin on Windows.
- `resmon.disk.format`: Configures how the disk space is displayed (percentage remaining/used, absolute remaining, used out of totel).
- `resmon.disk.drives`: Drives to show. For example, 'C:' on Windows, and '/dev/sda1' on Linux.
- `resmon.updatefrequencyms`: How frequently to query systeminformation. The minimum is 200 ms as to prevent accidentally updating so fast as to freeze up your machine.
- `resmon.freq.unit`: Unit used for the CPU frequency (GHz-Hz).
- `resmon.mem.unit`: Unit used for the RAM consumption (GB-B).
- `resmon.alignLeft`: Toggles the alignment of the status bar.
- `resmon.color`: Color of the status bar text in hex code (for example, #FFFFFF is white). The color must be in the format #RRGGBB, using hex digits.

## Known Issues
## Features

A better solution for Windows CPU Usage would be great. I investigated alternatives to counting Processor Time, but none of them seemed to match the Task Manager percentage.
- **CPU** — usage percentage and current frequency
- **GPU** — utilization and memory in use (macOS, including M-series Apple Silicon)
- **Memory** — consumed out of total
- **Disk** — space remaining or used, per drive
- **Battery** — percentage remaining, hidden automatically on devices without a battery

---
## Screenshot

## Change Log
![System Vitals in the VS Code status bar](images/statusbar.png)

### [1.0.7]
- Changed underlying CPU frequency API, added hiding battery/CPU temp information if the device lacks a battery/doesn't support CPU temp sensing, added some clarifications about CPU frequency behavior on Windows.
CPU usage, CPU frequency, GPU utilization and memory, running on an Apple Silicon Mac. GPU memory, disk space and CPU temperature are available as well, and are off by default.

### [1.0.6]
## Requirements

- Added DiskSpace, CPU Temperature. Adjusted battery icon.
None beyond VS Code 1.53 or newer. The `systeminformation` module is bundled with the extension, and macOS GPU statistics are read from the IOKit registry with `ioreg`, which requires no additional software and no elevated privileges.

### [1.0.5]
## Extension Settings

- Refactored code heavily, addressed Github issue with memory.used versus memory.active.
- `systemvitals.show.cpuusage`: Show CPU Usage. In Windows, this percentage is calculated with processor time, which doesn't quite match the task manager figure.
- `systemvitals.show.cpufreq`: Show CPU Frequency. This may just display a static frequency on Windows.
- `systemvitals.show.mem`: Show consumed and total memory as a fraction.
- `systemvitals.show.battery`: Show battery percentage remaining.
- `systemvitals.show.disk`: Show disk space information.
- `systemvitals.show.cputemp`: Show CPU temperature. May not work without the lm-sensors module on Linux. May require running VS Code as admin on Windows.
- `systemvitals.show.gpu`: Show GPU utilization. macOS only; see GPU Monitoring below.
- `systemvitals.show.gpumem`: Show GPU memory in use. macOS only; see GPU Monitoring below.
- `systemvitals.gpu.unit`: Unit used for GPU memory (GB-B).
- `systemvitals.disk.format`: Configures how the disk space is displayed (percentage remaining/used, absolute remaining, used out of totel).
- `systemvitals.disk.drives`: Drives to show. For example, 'C:' on Windows, and '/dev/sda1' on Linux.
- `systemvitals.updatefrequencyms`: How frequently to query systeminformation. The minimum is 200 ms as to prevent accidentally updating so fast as to freeze up your machine.
- `systemvitals.freq.unit`: Unit used for the CPU frequency (GHz-Hz).
- `systemvitals.mem.unit`: Unit used for the RAM consumption (GB-B).
- `systemvitals.alignLeft`: Toggles the alignment of the status bar.
- `systemvitals.color`: Color of the status bar text in hex code (for example, #FFFFFF is white). The color must be in the format #RRGGBB, using hex digits.

### [1.0.4]
## GPU Monitoring

- Added icon for store.
GPU statistics are **macOS only**, and work on Apple Silicon (M-series) as well as Intel Macs. They are read from the IOKit registry with `ioreg`, which requires no elevated privileges — unlike `powermetrics`, which needs `sudo`. On any machine that does not report GPU statistics, both GPU metrics hide themselves automatically rather than showing an error.

### [1.0.3]
- `systemvitals.show.gpu` displays GPU utilization as a percentage. This is the driver's instantaneous `Device Utilization %`, sampled at each update rather than averaged over the interval, so expect it to fluctuate the same way CPU usage does.
- `systemvitals.show.gpumem` displays GPU memory as *in use / allocated*. Note that this is **not** used-out-of-VRAM: Apple Silicon uses unified memory with no fixed GPU partition, so the second figure is how much system memory the GPU driver has currently claimed, not a fixed capacity. It moves over time.

- Changed icons. Added choosable units.
GPU frequency and GPU power are not available, as both require `sudo powermetrics` or private APIs.

### [1.0.2]
Linux and Windows GPU monitoring is not implemented; each would need a separate backend (`nvidia-smi` / `/sys/class/drm`, and WMI / NVML respectively).

- Actually properly added systeminformation as a real dependency.
## Known Issues

### [1.0.1]
A better solution for Windows CPU Usage would be great. I investigated alternatives to counting Processor Time, but none of them seemed to match the Task Manager percentage.

- Properly added systeminformation as a real dependency
---

### [1.0.0]
## Change Log

- Initial release
See [CHANGELOG.md](CHANGELOG.md).
Binary file removed images/disk_space_screenshot.png
Binary file not shown.
Binary file removed images/example.png
Binary file not shown.
Binary file modified images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/statusbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading