npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

killcommand

v0.0.14

Published

**STILL IN BETA**

Downloads

27

Readme

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

| Command | Description | | ----------- |:-------------| | start | Starts killcommand (Default action if you don't send any command) | | stop | Stops killcommand, if running | | top | Shows a list with the current top processes | | kill | Kills a given command by pid, name or port that it's using.See examples bellow | | list | Alias to --list. Shows a list of running processes matching a pattern |

Options

Available options:

| Option, Alias | Description | | ------------- |:-------------| | --stop | Stops the current daemon, if any | | --list | Shows a list of running processes matching a pattern | | --help, -h | Show this help content | | --version, -v | Shows the current version | | --verbose | Show log/debugging messages | | --alert <Int> | If any process passes this <Int>%, the alert is triggeredDefault is 90% | | --limit <Int> | If any process passes this <Int>%, it is killed on sightDefault is 0% (use 0 to |disable this option) | --interval <Int> | Interval time (in seconds) for checking top processesDefault is 5 | | --ignore [<Str>] | A list of programs that are ignored | | --alert-ignored | Should show the alert, even for ignored programs when they.cross the line? | | --interactive | Starts NOT as a daemon, but interactive in the currentterminal. 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