
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
node-process-watcher
Advanced tools
A lightweight real-time monitoring system for all process information. 轻量级的实时监控系统上所有的进程信息。并可以获取获取系统所有的进程信息,进程的子进程信息,杀死进程以及子进程。
const {node_process_watcher} = require("node-process-watcher");
// or import {node_process_watcher} from "node-process-watcher";
node_process_watcher.on("screen1",(list)=>{
// Print the information of all processes on the system every second
// 每秒打印一次系统上所有进程的信息
console.log(list[0]);
// { id: 4, user_name: 'SYSTEM', cpu: 0, mem: 0, name: 'System' }
node_process_watcher.close("screen1"); // 关闭
})
node_process_watcher.on("screen2",(list)=>{
// Filter specific processes
// 过滤特定的进程
node_process_watcher.pids("screen2",[
list[0].id
])
console.log(list[0]);
if (list.length === 1) {
// Stop listening for information only after all the on events are closed
// 所有的on关闭后才会停止监听信息上的信息
node_process_watcher.close("screen2");
}
})
node_process_watcher.get_all_pid(); // 获取所有进程信息
node_process_watcher.get_all_pid(1234); // 获取1234的所有子进程信息
node_process_watcher.kill_process(1234,true); // 杀死 1234 包括他的 的所有子进程
对于进程的内存信息,在windows下采集的是工作集(wss)大小(一段时间内进程所需要的内存页集合大小),在Linux下采集的是(rss)物理常驻集大小,表示所占用的所有物理上的内存大小包括共享内存。
FAQs
Get process information in real time
The npm package node-process-watcher receives a total of 185 weekly downloads. As such, node-process-watcher popularity was classified as not popular.
We found that node-process-watcher demonstrated a healthy version release cadence and project activity because the last version was released less than 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
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.