def net_io():
    """
        Get usage statistics on all system net interfaces.

    config_io:
    {
      "channels": {
        "net_io": {
          "display_name": "NetIO",
          "description": "Network statistics of the gateway.",
          "properties": {
            "data_type": "STRING"
          },
          "protocol_config": {
            "application": "Simulator",
            "report_on_change": false,
            "sample_rate": 30000,
            "report_rate": 30000,
            "app_specific_config": {
              "function": "net_io",
              "parameters": {},
              "positionals": []
            }
          }
        }
      }
    }
    """
    try:
        import psutil as _psutil
    except ImportError:
        error_msg = (
            'Unable to import psutil. Please install in order to use the sys_info function.'
            )
        raise ImportError(error_msg)
    payload = {}
    ioc = _psutil.net_io_counters(pernic=True)
    for iface in ioc:
        if not payload.get(iface):
            payload[iface] = {}
        for elem in dir(ioc[iface]):
            if not elem.startswith('_'):
                if hasattr(ioc[iface], elem):
                    attr = getattr(ioc[iface], elem)
                    if callable(attr):
                        pass
                    else:
                        payload[iface][elem] = attr
                elif hasattr(ioc[iface], '__dict__') and ioc[iface
                    ].__dict__.get(elem):
                    payload[iface][elem] = ioc[iface].__dict__[elem]
    return payload
