2.1.0 • Published 5 years ago

host-pinger v2.1.0

Weekly downloads
1
License
GPLv3
Repository
github
Last release
5 years ago

Host pinger

Ping your multiple hosts in realtime from the CLI or use it as Node.js module.

CLI

Install

npm install --global host-pinger

Usage

$ host-pinger --help

   Usage
     $ host-pinger [alias@]host, [[alias@]host...]

   Options
     -a, --amount Amount of pings. Infinitely (0) by default;
     -d, --delay Delay in ms. 1000 by Default;
     -h, --help Get help;

   Examples
    host-pinger Home@192.168.1.1 google.com -a 20 -d 1000

Node.js Module

Install

npm install --save host-pinger

Usage

const HostPinger = require('host-pinger');

let hostPinger = new HostPinger({
  hosts: [
    {alias: 'Home', host: '192.168.1.1'},
    'google.com'
  ]
});

//Get pings
hostPinger.start(servers => {
  //...
});

//Stop receive pings
hostPinger.stop();


//Error handling
hostPinger.on('error', err => {
  //...
});

HostPinger

new HostPinger(opts)

Create a new HostPinger.

ParamTypeDescription
optionsObject
options.amountNumberAmount of pings. Infinitely (0) by default;
options.delayNumberDelay in ms. 1000 by Default;
options.hostsArrayArray of hosts strings or objects

Server response structure

{ hostName: 'google.com',
 address: '92.223.8.109',
 ping: 10 }
2.1.0

5 years ago

2.0.0

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

7 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago