
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
library for getting memory and cpu usage for windows, mac or linux - other os's are not supported. No production dependancies or compilation needed :)
look at the unit tests to see how it is used. remember - you can pull out basic process memory stuff (rss, heapTotal, heapUsed) using process.memoryUsage() - this gives you the % CPU usage per process, and if you are using linux the vsize
npm install proc-stats
var procStats = require('proc-stats');
procStats.stats(function(e, result){
/*
linux:
result looks like:
{
memory: 25751552, // resident set size
memoryInfo:
{ rss: 25751552, // resident set size
vsize: 3123171328,//virtual set size
heapTotal: 16486912,
heapUsed: 9636688
},
cpu: 1.6
} //CPU USAGE
windows:
result looks same, but no vsize
{
memory: 25751552, // resident set size
memoryInfo:
{ rss: 25751552, // resident set size
heapTotal: 16486912,
heapUsed: 9636688
},
cpu: 1.6
} //CPU USAGE
*/
});
thanks to Kyll Ross for the windows stuff, https://github.com/KyleRoss/windows-cpu - NB though, I have been testing, and the CPU time always seems to be returningzero - I suspect my unit test isnt generating enough load on windows, dont have time right now to investigate further...
FAQs
gets usage stats for a process
The npm package proc-stats receives a total of 481 weekly downloads. As such, proc-stats popularity was classified as not popular.
We found that proc-stats demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.