- Published on
Keeping Track of Resource Usage
- Authors
- Name
- Yair Mark
- @yairmark
As a developer we push our machines very hard, maxing out our CPUs and RAM while building an app for example. I have found that with a fresh install one thing I always do (no matter what OS I am using) is work out how to have a constant visual indicator of key resources. This is very useful as you can quickly pick up potential issues with code you are building and running if there is a sudden unexpected spike in one or both of CPU and RAM and they do not look as if they are going to be going down anytime soon.
For example when I started playing around with ReactJS I made the mistake of trying to update state in the render
method. This resulted in essentially an infinite loop which I picked up as soon as I hit my page as both my CPU and RAM suddenly spiked. I quickly killed the tab in Chrome (Shift-Esc
) and I fixed this issue.
My go-to programs for menu monitoring across *nix platforms are:
Mac
- MenuMeters: OS X 10.11-
- MenuMeters: OS X 10.11+
Linux
When using indicator multi load you can get the textual CPU/RAM representation by adding the following to the indicator settings:
C: $(percent(cpu.inuse)) || M: $(percent(mem.user/mem.total))