Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

killcommand

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

killcommand

**STILL IN BETA**

  • 0.0.14
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Kill Command

STILL IN BETA

So...I heard some processes of yours aren't behaving!
I will hunt the ones that cross the line and let you know. And if you want them gone, just trust your friend here.

You can specify the threshold to be alerted when any process crosses the line, or even define a limit which should kill any process that dares crossing it!

You're welcome.

image

image

Also, how to kill any process that is using a given port, you ask? Yeah, just let me know which port you want to free and I take care of that for you.

Install

npm install -g killcommand

Running it

killcommand [command] [--options]

Commands

CommandDescription
startStarts killcommand (Default action if you don't send any command)
stopStops killcommand, if running
topShows a list with the current top processes
killKills a given command by pid, name or port that it's using.
See examples bellow
listAlias to --list. Shows a list of running processes matching a pattern

Options

Available options:

Option, AliasDescription
--stopStops the current daemon, if any
--listShows a list of running processes matching a pattern
--help, -hShow this help content
--version, -vShows the current version
--verboseShow log/debugging messages
--alert <Int>If any process passes this <Int>%, the alert is triggered
Default is 90%
--limit <Int>If any process passes this <Int>%, it is killed on sight
Default is 0% (use 0 to
--interval <Int>Interval time (in seconds) for checking top processes
Default is 5
--ignore [<Str>]A list of programs that are ignored
--alert-ignoredShould show the alert, even for ignored programs when they.
cross the line?
--interactiveStarts NOT as a daemon, but interactive in the current
terminal. You can use Ctrl+C to exit.

Examples:

Just start it with default options:

~$ killcommand
~$ # OR
~$ killcommand start

Stop it:

~$ killcommand stop

See top processes and their names:

~$ killcommand top

Start daemon ignoring glimpse and blender processes.
Also, will alert if any process reaches 50% of CPU and automatically kill any process that crosses the 80% limit (except the ignored ones):

~$ killcommand --alert=50 --limit=80 --ignore=glimpse --ignore=blender

Ignoring all chrome processes including their renderers

~$ killcommand --ignore="%google%chrome%"

Kills all tabs of brave browser

~$ killcommand kill "%brave%renderer%"

Kills all tabs of brave browser automatically answering yes to any question

~$ killcommand kill "%brave%renderer%" --yes
~$ # OR
~$ killcommand kill "%brave%renderer%" --no-questions-asked

Kills whichever program is listening in port 3000

~$ killcommand kill :3000

Get the name of the process by its PID:

~$ killcommand list 1680

Get the list of processes from "Google Chrome" browser:

~$ killcommand list "chrome"

Get the list of processes from "Google Chrome" browser, but only the renderers (tabs):

~$ killcommand list "chrome%renderer"

Developing

If you want to run it locally while applying changes to it, you can clone the project, then run it like this:

node ./cli.js --interactive --verbose [--other-options]

This way you can see the logs and abort it more easily.

Image credits

Header: Homem vetor criado por freepik - br.freepik.com

Contribute

  • By sending Pull Requests
  • By sending feedback or opening the issues
  • By donating:

Buy us a coffee :)

BTC: 1GuTME1bGbk7hY7ssrUBh3M1k4AeyVCSjW
ETH: 0x49f1612d4a8e9165f2eb94be79af9dbbf3815af5

Keywords

FAQs

Package last updated on 09 Mar 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc