arunoda / node-usage

process usage lookup with nodejs
MIT License
389 stars 93 forks source link

Strange CPU numbers.. #14

Closed matejkramny closed 11 years ago

matejkramny commented 11 years ago

I get strange CPU percentages on Linux.. I have top (with the process' pid) open and the numbers do not correspond at all.

To test this, I ran siege (http benchmarking) on the monitored process which does some computational tasks. Top reports around 100% whereas this reports about 1.3%.

This works fine on my mac, the numbers match what activity monitor reports. But its really strange on linux.

How does node-usage cope with multiple cores / multiple processors? Is this why the numbers don't match?

matejkramny commented 11 years ago

Sorry, my fault.

Turning on the keepHistory flag solves this.