
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
monitor-pid
Advanced tools
Monitors a pid and all its sons.
Use case example: watch a Web server system activity being stressed by siege (benchmarking). Then use Libreoffice or Excel to analyze the CPU, MEM and DISK usage of the Web server.
npm install monitor-pid
It also requires pidstat (>= 10.x) and pstree linux command to be installed on the system (apt-get install sysstat psmisc)
npm install -g monitor-pid
monitor-pid --pid 5253 --period 5000
It will monitor the pid 5253 each 5 secondes and output cpu, memory, disk and nb_pids statistics as a CSV string on stdout.
Output example:
date,time,parent_pid,nb_pids,monit_time,%usr,%system,%guest,%CPU,minflt/s,majflt/s,VSZ,RSS,%MEM,kB_rd/s,kB_wr/s,kB_ccwr/s
2013/11/09 13:05:52,0,1,167,1062,7.84,0.98,0.00,8.82,20.58,0.00,47132328.00,2683424.00,33.22,-105.00,44.02,-97.16
2013/11/09 13:05:57,5,1,167,1053,12.74,5.88,0.00,18.62,2561.77,0.00,47132140.00,2687784.00,33.28,-105.00,79.31,-101.08
2013/11/09 13:06:02,10,1,167,1052,29.70,10.89,0.00,40.59,4618.81,0.00,47141112.00,2688768.00,33.30,-105.00,-97.08,-97.08
2013/11/09 13:06:07,15,1,167,1046,11.88,4.95,0.00,16.83,2051.49,0.00,47199016.00,2682536.00,33.22,-105.00,-61.44,-101.04
2013/11/09 13:06:12,20,1,167,1045,5.94,0.99,0.00,6.93,19.80,0.00,47203476.00,2679040.00,33.17,-105.00,-105.00,-105.00
var MonitorPid = require('monitor-pid');
// creates an instance of MonitorPid
// - pid to monitor is 5253
// - monitoring will occure each 5 secondes
var mp = new MonitorPid(5253, { period: 5000 });
// received each time the pid tree has been monitored
mp.on('monitored', function (pid, stats) {
console.error('monitored', pid, stats);
});
// occurs when the monitoring is finished
// (no more pid or stop has been called)
mp.on('end', function (pid) {
console.error('end', pid);
});
mp.on('error', function (err) {
console.error(err);
});
// begin the monitoring
mp.start();
// stop the monitoring after 50 secondes
setTimeout(function () {
mp.stop();
}, 50000);
CPU fields:
Memory fields:
Disk fields:
FAQs
Monitors a pid and all its sons
We found that monitor-pid 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.