# getInstanceData function

Future<Map<String, String>> getInstanceData(

1. String item

)

## Implementation

    Future<Map<String, String>> getInstanceData(String item) async {
      String ip = await WSLApi().execCmdAsRoot(item, 'hostname --all-ip-addresses');
      String portsTcp =
          extractPorts(await WSLApi().execCmdAsRoot(item, 'cat /proc/net/tcp'));
      String portsUdp =
          extractPorts(await WSLApi().execCmdAsRoot(item, 'cat /proc/net/udp'));
      String portsTcp6 =
          extractPorts(await WSLApi().execCmdAsRoot(item, 'cat /proc/net/tcp6'));
      String portsUdp6 =
          extractPorts(await WSLApi().execCmdAsRoot(item, 'cat /proc/net/udp6'));
      return {
        'ip': ip,
        'portsTcp': portsTcp,
        'portsUdp': portsUdp,
        'portsTcp6': portsTcp6,
        'portsUdp6': portsUdp6,
      };
    }