Skip to content

Instantly share code, notes, and snippets.

@yurynix
Created February 25, 2020 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurynix/e2bc4def0c7ce27241df0f2b7f98de7d to your computer and use it in GitHub Desktop.
Save yurynix/e2bc4def0c7ce27241df0f2b7f98de7d to your computer and use it in GitHub Desktop.
const processStats = await getProcessStats();
printProcessStats(processStats);
processStats.forEach(processInfo => {
console.log(`Sending SIGKILL to pid: ${processInfo.pid} exe: ${processInfo.exe}`);
process.kill(processInfo.pid, 'SIGKILL');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment