New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ifstat-json

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ifstat-json

ifstat wrapper that outputs a json object to stdout

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Overview

Wrapper for the ifstat command that outputs JSON objects.

Installation

npm install -g ifstat-json

Usage

No options at this time; Only the simple script is available.

$ ifstat-json

Details

The script outputs JSON objects that are in the following format ( interface names are dynamically grabbed ):

{ hostname: 'Roberts-MBP',
  date: 2017-12-02T06:33:25.694Z,
  interfaces: 
   { lo0: { in: 0, out: 0 },
     gif0: { in: 0, out: 0 },
     stf0: { in: 0, out: 0 },
     en0: { in: 0.98, out: 0.33 },
     en1: { in: 0, out: 0 },
     en2: { in: 0, out: 0 },
     p2p0: { in: 0, out: 0 },
     awdl0: { in: 0, out: 0 },
     bridge0: { in: 0, out: 0 } } }

Note that the output is actually all on a single line, and looks like the following:

{"hostname":"Roberts-MBP","date":"2017-12-02T06:33:25.694Z","interfaces":{"lo0":{"in":0,"out":0},"gif0":{"in":0,"out":0},"stf0":{"in":0,"out":0},"en0":{"in":0.98,"out":0.33},"en1":{"in":0,"out":0},"en2":{"in":0,"out":0},"p2p0":{"in":0,"out":0},"awdl0":{"in":0,"out":0},"bridge0":{"in":0,"out":0}}}

Keywords

ifstat network wrapper interface networking json parse cli

FAQs

Package last updated on 02 Dec 2017

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