sanketsudake / ifconfig-parser

Parse ifconfig output collected from local/remote server and retrieve values with goodies

Home Page:https://pypi.python.org/pypi/ifparser/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ifconfig-parser

image

Parse ifconfig output collected from local or remote server and retrieve required interface information.

Usage

Install ifconfig-parser:

You can access inferface information as below :

You can query for intefaces on particular parameter :

[obj-lo, obj-docker0, obj-eth0]

Get all interface parameters with get_values. Following dictionary contains all possible values:

List of parameters for interface:

  • BROADCAST, LOOPBACK, MULTICAST, RUNNING, UP, DYNAMIC, NOARP, PROMISC, POINTOPOINT, SIMPLEX, SMART, MASTER, SLAVE
  • interface - Interface name, itype - Interface Type
  • ip - IP, bcast - Broadcast, mask - Mask
  • hwaddr - MAC address, mtu - MTU
  • rxbytes - Received Bytes, rxpkts - Received Packets
  • txbytes - Sent Bytes, txpkts - Sent Packets

About

Parse ifconfig output collected from local/remote server and retrieve values with goodies

https://pypi.python.org/pypi/ifparser/

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%