2.0.1 • Published 7 years ago

iftop v2.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

iftop

Use the power and speed of iftop to get flow rates and totals of traffic incident on a network device.

Note that the user running this process will need capture permissions on the specified device.

Examples of how this is typically done:

linux:

sudo setcap cap_net_raw,cap_net_admin=eip /usr/sbin/iftop

macOS:

sudo chmod +r /dev/bpf*

Usage

var IftopParser = require('iftop');

IftopParser.iftopPath = "/usr/sbin/iftop"; // only if iftop is not on the path

var iftop = new IftopParser("eth0");

# set up error handler
iftop.on('error', (e) => {
    console.error(e);
});

# set up data handler
iftop.on('data', (d) => {
    console.log(d);
});

iftop.start();

# optional manipulations after start() has been called (these are passed to iftop)
iftop.toggleAggregateSrc();
iftop.toggleAggregateDst();
iftop.toggleDNSResolution();
iftop.togglePortDisplay();

License

ISC

2.0.1

7 years ago

2.0.0

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago