Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu value returns zero #169

Open
Paul-Reed opened this issue Mar 26, 2023 · 2 comments
Open

cpu value returns zero #169

Paul-Reed opened this issue Mar 26, 2023 · 2 comments

Comments

@Paul-Reed
Copy link

Hi, I'm using your library on a Oracle Cloud VM.Standard.A1.Flex server, with Canonical-Ubuntu-22.04 OS.
Unfortunately, it does not return the "cpu" value, and for every child process the result is "cpu":0.
There are no errors in the logfile and the other metrics appear to display correctly.

Is this a known compatibility issue?

@cameo69
Copy link

cameo69 commented Apr 4, 2023

Hi, I am having a similar issue.

Originally I mentioned the issue on a module that uses your library:
bartbutenaers/node-red-contrib-process-resources#1 (comment)
Node Red for reference here: https://discourse.nodered.org/t/node-red-kept-restarting-upon-git-push/77181

The issue shows in my log like this:
3 Apr 08:06:09 - [red] Uncaught Exception:
3 Apr 08:06:09 - [error] TypeError: Cannot read properties of null (reading 'cpu')
at /data/node_modules/node-red-contrib-process-resources/process_resources.js:61:75
at Array.forEach ()
at sendMessage (/data/node_modules/node-red-contrib-process-resources/process_resources.js:59:33)
at /data/node_modules/node-red-contrib-process-resources/process_resources.js:113:25
at /data/node_modules/pidusage/lib/stats.js:90:7
at each (/data/node_modules/pidusage/lib/helpers/parallel.js:24:15)
at /data/node_modules/pidusage/lib/helpers/parallel.js:32:9
at /data/node_modules/pidusage/lib/procfile.js:111:14
at /data/node_modules/pidusage/lib/procfile.js:43:5
at FSReqCallback.wrapper [as oncomplete] (node:fs:660:5)

https://github.com/bartbutenaers/node-red-contrib-process-resources put a workaround in place, but the author suggested that you check in your library.

Please let us know if you need more details.

@soyuka
Copy link
Owner

soyuka commented Apr 4, 2023

feel free to add the Red compatibility to this project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants