Memory consumption bar vs htop .. wildly different usage


#1

I am trying to run some bash scripts, occasionally passing some data to a php script run via the command line.
One of my objectives is to make them as memory- and cpu-efficient as possible.
However, I have noticed that the little memory and cpu usage indicators within the IDE differ quite considerably to “HTOP” - an example screenshot provided.

So my question really is which one should I be using? It’s a lot easier to use the IDE-based overview as it means i can monitor the console for what my scripts are doing. However, if this isn’t reliable I will change.

A secondary question on the back of this is obviously there are some potential “fair usage” issues here as I can actually go over 100% CPU usage (Note that if this happens I immediately stop the script and and running processes). What happens in cases of over-consumption?

thanks, as always I love c9, it has changed my life for the better