soyuka / pidusage

Cross-platform process cpu % and memory usage of a PID
MIT License
512 stars 55 forks source link

Pidusage doesn't work on Debian #111

Closed StoneT2000 closed 4 years ago

StoneT2000 commented 4 years ago

Pidusage can't seem to track procfiles easily when I'm running things in fast succession (the moment I start a child process, I check its usage every 100ms). When I changed the option from procfile to ps in the lib/stats.js folder for linux, it started to work.

soyuka commented 4 years ago

You can force using ps with pidusage(pid, {usePs: true}).