Code Monkey home page Code Monkey logo

resmon's Introduction

Resource Monitor

Features

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

Screenshots

Disk space feature.

Requirements

Just the system information node module.

Extension Settings

  • 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

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.


Change Log

[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]

  • Added DiskSpace, CPU Temperature. Adjusted battery icon.

[1.0.5]

  • Refactored code heavily, addressed Github issue with memory.used versus memory.active.

[1.0.4]

  • Added icon for store.

[1.0.3]

  • Changed icons. Added choosable units.

[1.0.2]

  • Actually properly added systeminformation as a real dependency.

[1.0.1]

  • Properly added systeminformation as a real dependency

[1.0.0]

  • Initial release

resmon's People

Contributors

d4n3x avatar dependabot[bot] avatar letmaik avatar lgaitan avatar niande-xbox avatar njanderson avatar tommatheussen avatar wrussell1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

resmon's Issues

Feature Request: GPU Usage

Hi, I love this extension while using Remote SSH feature in the Code Insider version.

Looking forward to adding support for showing GPU usage such as memory, utilization, etc. It would be absolutely brilliant for us while developing machine learning projects.

Maybe some terminal calls like "nvidia-smi" will show the gpu information for NVIDIA gpus.

Thank you very much! Great work!

Show "N/A" if no battery available

Currently, if the system has no battery, then "0%" is shown. systeminformation has si.hasbattery which should be queried to check whether a battery is available, and if not, show "N/A". Automatic hiding of the battery indicator would probably be even more useful.

setting has invalid type, expected string[]

I am a Mac user.

In VSCode settings ui, Resmon>Disk: Drives setting reports Setting has an invalid type, expected "String[]". Fix in JSON.

When you try to edit "resmon.disk.drives" in user settings json, these values do not work:

  • null
  • "/dev/disk1s5"
  • "/Volumes/mbp"
  • ["/dev/disk1s5"]
  • ["/Volumes/mbp"]
  • "['/Volumes/mbp']"

README notes "C:" for Windows and '/dev/sda1' for Linux. No examples for Mac. Single quotes are not accepted in settings JSON at all.

Although I don't want to see disk space in the status bar, what is the correct value to enter for resmon.disk.drives ?

Feature request: show uptime

Inspired by MobaXterm, which uses the following:

bash -c while [ -d /proc/$PPID ]; do sleep 1;head -v -n 8 /proc/meminfo; head -v -n 2 /proc/stat /proc/version /proc/uptime /proc/loadavg /proc/sys/fs/file-nr /proc/sys/kernel/hostname; tail -v -n 16 /proc/net/dev;echo '==> /proc/df <==';df;echo '==> /proc/who <==';who;echo '==> /proc/end <==';echo '##Moba##'; done

Feature Request: Disk Space

Hi, I love this extension. I am using it with the new MS Remote SSH feature, it adds a lot of value and convenience to my dev experience.

I use a barebones linux aws ec2, and I try to monitor disk space which helps keep cost down. It would be amazing to have an option to monitor disk space, so I can see if I'm running out of room. Perhaps just a single number in Gb for available disk space would be amazing.

Thank you for your work ๐Ÿ™๐Ÿผ

Python crashes

Type: Bug

The Python extantion stop work after every change of source file.

Extension version: 1.0.7
VS Code version: Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:51:52.184Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13700K (24 x 3418)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 63.75GB (44.88GB free)
Process Argv --crash-reporter-id 89863667-a143-463a-9a72-9116c9ceb2b8
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263cf:30335440
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30899288
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
282f8724:30602487
89544117:30613380
2i9eh265:30646982
showlangstatbar:30737416
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialog:30910333
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:30885898
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
dsvsc019cf:30909685

Remote WSL displays battery level at 0% on Windows laptop

When using Remote WSL, it shows the battery level as 0%. I imagine it may be difficult to actually get that data when inside WSL, so maybe hide it, if WSL detected.
image

The extension runs on the host, so should work fine for SSH as that will report the statistics of the machine running your code, however I haven't had a chance to test it yet. Will try later!

Using a ThinkPad T480s running Windows 10

Temperate not working on Mac

On my mac, the temperature reading is always -1 C

System info:

  • macOS Mojave 10.14.6
  • MacBook Pro 13" 2017
  • Intel Core i5 2.3 GHz

Happy to fork and add a fix.

Cannot set resmon.alignLeft

I just installed this (very nice) plugin, but I cannot set resmon.alignLeft: false to get the info moved to the right of the status bar. Is there anything I can or should do to fix this? Thanks!

Resource Monitor causing CPU usage

I recently experienced the Resource Monitor extension causing higher than expected CPU usage on Windows 10. This showed up in Task Manager as usage by Service Host: Windows Management Instrumentation. I traced the activity to WMI queries being run by Resource Monitor. On my machine, the extra usage was somewhere around 3-5% per VSCode window.

Obviously the extension will consume some resources, but I was surprised by how much CPU activity it was causing. It's possible something about my machine was causing the WMI Queries to consume more resources than they should.

Just wanted to note this in case anyone else was experiencing anything similar.

Cannot find module 'systeminformation'

Hi,

i'm interested in your extension, but unfortunately it doesn't run on my machine.

From what appears to me, you need to ship the extension with the required dependencies, in case systeminformation.

The vscode console has this warning:

Activating extension 'mutantdino.resourcemonitor' failed: Cannot find module 'systeminformation'.

From Microsoft documentation i've found: Using Node.js Modules with Extensions

unhide from statusbar

I accidentaly hide the Resource Monitor from the Statusbar...

How to unhide it?

I cant't find an option to enable it again...

Plugin causes high CPU load through Antimalware process

I complained that the antimalware service (Windows Defender) was constantly running on my PC with a rather high CPU load even though I was more or less only writing text files in vs code. I found out that the CPU load was caused by the resource monitor plugin in vs code because after removing it the CPU load of the antimalware vanished, and when I install it again I can see the old behavior again: antimalware on top of the task list with up to 25% cpu load. The Windows Defender log does not show much information here, but I can see frequent entries about processes being started, although it is in an order of seconds and I would not expect too much impact from this.

I found older issue about high CPU load caused by executing WMI queries. If I understand correctly, this is done spawning a new process, so it seems to match the behavior experienced on my machine. However, the impact is different because I do not see the WMI service consuming much load at all.

It may of course be caused by our configuration of Windows Defender.

Allow option to show *active* memory instead of *used*

When using the extension, it will show how much memory is being "used", which in the systeminformation module includes buffers & cache. This figure can be misleading, as buffered and cached memory is still technically available for use if needed.
I propose that either the used figure should default to a figure which does not include buffers and cache (referred to as active by the systeminformation module), or to allow the user an option in the configuration settings to change between the two (including or excluding buffers & cache).

Feature request: add hover text to status bar

It would be cool if there was a hover message on the status bar item which would clarify what this data is about.
Sometimes there are mutliple extensions in the status bar and the user is not sure which item is coming from what extension.

CPU frequency

  • Thank you very much for your work. Resource Monitor is very good. ๐Ÿ‘
  • I have a problem about CPU frequency:

At present, on my computer, CPU frequency shows Base speed(โ‘ ) instead of speed(โ‘ก). The value of Base speed will remain unchanged. image

For me, the latter is more important. I'm not sure if this is due to my setting error or if Resource Monitor doesn't support real-time display speed.

ๆ‰นๆณจ 2020-01-15 095124

Bug Report

I have connect my vs code over ssh connection and the battery icon and disk usage icon are not getting updated with live stats

image

Feature Request: Toggle Left/Right bound

First I have to thank you for your great extension. I really love to work with it.

In order to have a better overview I would like to bind my resmon to the right side. Due to my other extensions displaying diffferent stuff it looks quiet messy because all is bound to the left side.

At my point of view this would be a great help due to the overview.

greets Danex

Add typescript formatter

  • Research which one is best
  • Make some linting/formatting a PR requirement and workspace configuration

format request: fix width of info bar

Hello,

would it be possible to expose a settings, which would fix the overall width of info box in status bar?

The reasoning behind this is, that now with changing width (because of single vs double digit cpu usage, etc..) all other info boxes from other extensions are moving a bit, which causes distraction.

The displacement and consequent movement:

displacement

Is anyone still maintaining this extension?

The project lists a comparably high number of 6 contributors, yet the repository is fairly inactive. Are you looking for contributors? Or are there any notable forks that you could recommend?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.