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

n-brother

v1.0.6

Published

N-Brother is watching your distributed system

Downloads

14

Readme

N-Brother

NPM

N-Brother is a tool for monitoring multiple machines from a single client shell. Currently the communication does not have authentication or authorization. The messages are exchanged in plain-text. Running the daemon exposes your file-system for unauthenticated read access and is a security risk.

Getting Started

  1. Install the N-Brother package from NPM (on all the remote machines and your local machine)
~$ sudo npm install -g n-brother
  1. Start the N-Brother Daemon on the remote machines that you want to monitor.
~$ nbrod -p 8000

The above command will bind the N-Brother daemon process to port 8000. It starts a WebSocket server that listens for incoming commands.

  1. Start the N-Brother Shell on your local machine.
~$ nbro

The above command will start the interactive shell. Type "help" in the shell to see the list of available commands.

3.a. From the Shell, you can add a remote machine like below:

$ add daemon1 ws://daemon1.example.com:8000

daemon1 can be any string; this is the name of the remote machine that you give. daemon1.example.com should be replaced with either a DNS resolved host name or the remote machine's IP.

3.b. Connect to the machines.

$ connect

The shell will display the list of the machines, indicating whether they are connected or not. You can type show to see the list of machines.

3.c. Execute a command on the remote machines.

$ grep 123 ~/some-log-file.log

The shell will be 'pending' until all the remote machines return the grep output. Once all responses are received, the shell will display the output.

Commands

Shell commands

  1. show
    • Show the list of machines
  2. add {machine_id} {daemon_url}
    • Add a machine to the registry
  3. remove {machine_id}
    • Remove a machine from the registry
  4. connect
    • Connect to the machines
  5. disconnect
    • Disconnect from the machines
  6. help
    • Show the man page
  7. exit
    • Exit the shell

Remote commands

  1. grep {pattern} {file_path}
    • execute "grep" command on all the machines and retrieve the output