diff --git a/README.md b/README.md index 309019d0..e2394a10 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ There are several ways to get `jc`. You can install via `pip`; other OS package ### Pip (macOS, linux, unix, Windows) ``` -$ pip3 install --upgrade jc +$ pip3 install jc ``` ### OS Package Repositories diff --git a/changelog.txt b/changelog.txt index 8102a17e..6ed341f2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,30 @@ jc changelog +20200612 v1.11.5 +- Update airport_s parser to fix error on parsing empty data +- Update arp parser to fix error on parsing empty data +- Update blkid parser to fix error on parsing empty data +- Update crontab parser to fix error on parsing empty data +- Update crontab_u parser to fix error on parsing empty data +- Update df parser to fix error on parsing empty data +- Update free parser to fix error on parsing empty data +- Update lsblk parser to fix error on parsing empty data +- Update lsmod parser to fix error on parsing empty data +- Update mount parser to fix error on parsing empty data +- Update netstat parser to fix error on parsing empty data +- Update ntpq parser to fix error on parsing empty data +- Update ps parser to fix error on parsing empty data +- Update route parser to fix error on parsing empty data +- Update systemctl parser to fix error on parsing empty data +- Update systemctl_lj parser to fix error on parsing empty data +- Update systemctl_ls parser to fix error on parsing empty data +- Update systemctl_luf parser to fix error on parsing empty data +- Update uptime parser to fix error on parsing empty data +- Update w parser to fix error on parsing empty data +- Update xml parser to fix error on parsing empty data +- Add tests to all parsers for no data condition +- Update ss parser to fix integer fields + 20200610 v1.11.4 - Update ls parser to fix error on parsing an empty directory diff --git a/jc/cli.py b/jc/cli.py index 6f55ae40..3220f7a1 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -21,7 +21,7 @@ import jc.appdirs as appdirs class info(): - version = '1.11.4' + version = '1.11.5' description = 'jc cli output JSON conversion tool' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' diff --git a/jc/parsers/airport_s.py b/jc/parsers/airport_s.py index 9f8e3e1b..236f54d4 100644 --- a/jc/parsers/airport_s.py +++ b/jc/parsers/airport_s.py @@ -88,7 +88,7 @@ import jc.parsers.universal class info(): - version = '1.0' + version = '1.1' description = 'airport -s command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -170,15 +170,17 @@ def parse(data, raw=False, quiet=False): if not quiet: jc.utils.compatibility(__name__, info.compatible) - cleandata = data.splitlines() + raw_output = [] + cleandata = list(filter(None, data.splitlines())) - # fix headers - cleandata[0] = cleandata[0].lower() - cleandata[0] = cleandata[0].replace('-', '_') - cleandata[0] = cleandata[0].replace('security (auth/unicast/group)', 'security') + if cleandata: + # fix headers + cleandata[0] = cleandata[0].lower() + cleandata[0] = cleandata[0].replace('-', '_') + cleandata[0] = cleandata[0].replace('security (auth/unicast/group)', 'security') - # parse the data - raw_output = jc.parsers.universal.sparse_table_parse(cleandata) + # parse the data + raw_output = jc.parsers.universal.sparse_table_parse(cleandata) if raw: return raw_output diff --git a/jc/parsers/arp.py b/jc/parsers/arp.py index bec019cf..78777c1b 100644 --- a/jc/parsers/arp.py +++ b/jc/parsers/arp.py @@ -99,7 +99,7 @@ import jc.parsers.universal class info(): - version = '1.4' + version = '1.5' description = 'arp command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -171,69 +171,65 @@ def parse(data, raw=False, quiet=False): if not quiet: jc.utils.compatibility(__name__, info.compatible) - cleandata = data.splitlines() + raw_output = [] + cleandata = list(filter(None, data.splitlines())) - # remove final Entries row if -v was used - if cleandata[-1].startswith('Entries:'): - cleandata.pop(-1) + if cleandata: - # detect if freebsd/osx style was used - if cleandata[0][-1] == ']': - raw_output = [] - for line in cleandata: - splitline = line.split() - output_line = { - 'name': splitline[0], - 'address': splitline[1].lstrip('(').rstrip(')'), - 'hwtype': splitline[-1].lstrip('[').rstrip(']'), - 'hwaddress': splitline[3], - 'iface': splitline[5] - } + # remove final Entries row if -v was used + if cleandata[-1].startswith('Entries:'): + cleandata.pop(-1) - if 'permanent' in splitline: - output_line['permanent'] = True + # detect if freebsd/osx style was used + if cleandata[0][-1] == ']': + for line in cleandata: + splitline = line.split() + output_line = { + 'name': splitline[0], + 'address': splitline[1].lstrip('(').rstrip(')'), + 'hwtype': splitline[-1].lstrip('[').rstrip(']'), + 'hwaddress': splitline[3], + 'iface': splitline[5] + } + + if 'permanent' in splitline: + output_line['permanent'] = True + else: + output_line['permanent'] = False + + if 'expires' in splitline: + output_line['expires'] = splitline[-3] + + raw_output.append(output_line) + + if raw: + return raw_output else: - output_line['permanent'] = False + return process(raw_output) - if 'expires' in splitline: - output_line['expires'] = splitline[-3] + # detect if linux style was used + elif cleandata[0].startswith('Address'): - raw_output.append(output_line) + # fix header row to change Flags Mask to flags_mask + cleandata[0] = cleandata[0].replace('Flags Mask', 'flags_mask') + cleandata[0] = cleandata[0].lower() - if raw: - return raw_output + raw_output = jc.parsers.universal.simple_table_parse(cleandata) + + # otherwise, try bsd style else: - return process(raw_output) + for line in cleandata: + line = line.split() + output_line = { + 'name': line[0], + 'address': line[1].lstrip('(').rstrip(')'), + 'hwtype': line[4].lstrip('[').rstrip(']'), + 'hwaddress': line[3], + 'iface': line[6], + } + raw_output.append(output_line) - # detect if linux style was used - elif cleandata[0].startswith('Address'): - - # fix header row to change Flags Mask to flags_mask - cleandata[0] = cleandata[0].replace('Flags Mask', 'flags_mask') - cleandata[0] = cleandata[0].lower() - - raw_output = jc.parsers.universal.simple_table_parse(cleandata) - - if raw: - return raw_output - else: - return process(raw_output) - - # otherwise, try bsd style + if raw: + return raw_output else: - raw_output = [] - for line in cleandata: - line = line.split() - output_line = { - 'name': line[0], - 'address': line[1].lstrip('(').rstrip(')'), - 'hwtype': line[4].lstrip('[').rstrip(']'), - 'hwaddress': line[3], - 'iface': line[6], - } - raw_output.append(output_line) - - if raw: - return raw_output - else: - return process(raw_output) + return process(raw_output) diff --git a/jc/parsers/blkid.py b/jc/parsers/blkid.py index b241acaf..e8ebcd06 100644 --- a/jc/parsers/blkid.py +++ b/jc/parsers/blkid.py @@ -79,7 +79,7 @@ import jc.utils class info(): - version = '1.0' + version = '1.1' description = 'blkid command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -176,7 +176,7 @@ def parse(data, raw=False, quiet=False): raw_output = [] - if data: + if list(filter(None, data.splitlines())): # if the first field is a device, use normal parsing: if data.split(maxsplit=1)[0][-1] == ':': linedata = data.splitlines() diff --git a/jc/parsers/crontab.py b/jc/parsers/crontab.py index b64e2281..2b581a25 100644 --- a/jc/parsers/crontab.py +++ b/jc/parsers/crontab.py @@ -132,7 +132,7 @@ import jc.parsers.universal class info(): - version = '1.2' + version = '1.3' description = 'crontab command and file parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -225,44 +225,45 @@ def parse(data, raw=False, quiet=False): # Clear any blank lines cleandata = list(filter(None, cleandata)) - # Clear any commented lines - for i, line in reversed(list(enumerate(cleandata))): - if line.strip().startswith('#'): - cleandata.pop(i) + if cleandata: + # Clear any commented lines + for i, line in reversed(list(enumerate(cleandata))): + if line.strip().startswith('#'): + cleandata.pop(i) - # Pop any variable assignment lines - cron_var = [] - for i, line in reversed(list(enumerate(cleandata))): - if '=' in line: - var_line = cleandata.pop(i) - var_name = var_line.split('=', maxsplit=1)[0].strip() - var_value = var_line.split('=', maxsplit=1)[1].strip() - cron_var.append({'name': var_name, - 'value': var_value}) + # Pop any variable assignment lines + cron_var = [] + for i, line in reversed(list(enumerate(cleandata))): + if '=' in line: + var_line = cleandata.pop(i) + var_name = var_line.split('=', maxsplit=1)[0].strip() + var_value = var_line.split('=', maxsplit=1)[1].strip() + cron_var.append({'name': var_name, + 'value': var_value}) - raw_output['variables'] = cron_var + raw_output['variables'] = cron_var - # Pop any shortcut lines - shortcut_list = [] - for i, line in reversed(list(enumerate(cleandata))): - if line.strip().startswith('@'): - shortcut_line = cleandata.pop(i) - occurrence = shortcut_line.split(maxsplit=1)[0].strip().lstrip('@') - cmd = shortcut_line.split(maxsplit=1)[1].strip() - shortcut_list.append({'occurrence': occurrence, - 'command': cmd}) + # Pop any shortcut lines + shortcut_list = [] + for i, line in reversed(list(enumerate(cleandata))): + if line.strip().startswith('@'): + shortcut_line = cleandata.pop(i) + occurrence = shortcut_line.split(maxsplit=1)[0].strip().lstrip('@') + cmd = shortcut_line.split(maxsplit=1)[1].strip() + shortcut_list.append({'occurrence': occurrence, + 'command': cmd}) - # Add header row for parsing - cleandata[:0] = ['minute hour day_of_month month day_of_week command'] + # Add header row for parsing + cleandata[:0] = ['minute hour day_of_month month day_of_week command'] - if len(cleandata) > 1: - cron_list = jc.parsers.universal.simple_table_parse(cleandata) + if len(cleandata) > 1: + cron_list = jc.parsers.universal.simple_table_parse(cleandata) - raw_output['schedule'] = cron_list + raw_output['schedule'] = cron_list - # Add shortcut entries back in - for item in shortcut_list: - raw_output['schedule'].append(item) + # Add shortcut entries back in + for item in shortcut_list: + raw_output['schedule'].append(item) if raw: return raw_output diff --git a/jc/parsers/crontab_u.py b/jc/parsers/crontab_u.py index 6487cf3e..64ce9e81 100644 --- a/jc/parsers/crontab_u.py +++ b/jc/parsers/crontab_u.py @@ -133,7 +133,7 @@ import jc.parsers.universal class info(): - version = '1.1' + version = '1.2' description = 'crontab file parser with user support' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -226,46 +226,47 @@ def parse(data, raw=False, quiet=False): # Clear any blank lines cleandata = list(filter(None, cleandata)) - # Clear any commented lines - for i, line in reversed(list(enumerate(cleandata))): - if line.strip().startswith('#'): - cleandata.pop(i) + if cleandata: + # Clear any commented lines + for i, line in reversed(list(enumerate(cleandata))): + if line.strip().startswith('#'): + cleandata.pop(i) - # Pop any variable assignment lines - cron_var = [] - for i, line in reversed(list(enumerate(cleandata))): - if '=' in line: - var_line = cleandata.pop(i) - var_name = var_line.split('=', maxsplit=1)[0].strip() - var_value = var_line.split('=', maxsplit=1)[1].strip() - cron_var.append({'name': var_name, - 'value': var_value}) + # Pop any variable assignment lines + cron_var = [] + for i, line in reversed(list(enumerate(cleandata))): + if '=' in line: + var_line = cleandata.pop(i) + var_name = var_line.split('=', maxsplit=1)[0].strip() + var_value = var_line.split('=', maxsplit=1)[1].strip() + cron_var.append({'name': var_name, + 'value': var_value}) - raw_output['variables'] = cron_var + raw_output['variables'] = cron_var - # Pop any shortcut lines - shortcut_list = [] - for i, line in reversed(list(enumerate(cleandata))): - if line.strip().startswith('@'): - shortcut_line = cleandata.pop(i) - occurrence = shortcut_line.split(maxsplit=1)[0].strip().lstrip('@') - usr = shortcut_line.split(maxsplit=2)[1].strip() - cmd = shortcut_line.split(maxsplit=2)[2].strip() - shortcut_list.append({'occurrence': occurrence, - 'user': usr, - 'command': cmd}) + # Pop any shortcut lines + shortcut_list = [] + for i, line in reversed(list(enumerate(cleandata))): + if line.strip().startswith('@'): + shortcut_line = cleandata.pop(i) + occurrence = shortcut_line.split(maxsplit=1)[0].strip().lstrip('@') + usr = shortcut_line.split(maxsplit=2)[1].strip() + cmd = shortcut_line.split(maxsplit=2)[2].strip() + shortcut_list.append({'occurrence': occurrence, + 'user': usr, + 'command': cmd}) - # Add header row for parsing - cleandata[:0] = ['minute hour day_of_month month day_of_week user command'] + # Add header row for parsing + cleandata[:0] = ['minute hour day_of_month month day_of_week user command'] - if len(cleandata) > 1: - cron_list = jc.parsers.universal.simple_table_parse(cleandata) + if len(cleandata) > 1: + cron_list = jc.parsers.universal.simple_table_parse(cleandata) - raw_output['schedule'] = cron_list + raw_output['schedule'] = cron_list - # Add shortcut entries back in - for item in shortcut_list: - raw_output['schedule'].append(item) + # Add shortcut entries back in + for item in shortcut_list: + raw_output['schedule'].append(item) if raw: return raw_output diff --git a/jc/parsers/df.py b/jc/parsers/df.py index 880537f8..498937c3 100644 --- a/jc/parsers/df.py +++ b/jc/parsers/df.py @@ -73,7 +73,7 @@ import jc.parsers.universal class info(): - version = '1.3' + version = '1.4' description = 'df command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -184,14 +184,16 @@ def parse(data, raw=False, quiet=False): jc.utils.compatibility(__name__, info.compatible) cleandata = data.splitlines() + raw_output = [] - # fix headers - cleandata[0] = cleandata[0].lower() - cleandata[0] = cleandata[0].replace('-', '_') - cleandata[0] = cleandata[0].replace('mounted on', 'mounted_on') + if list(filter(None, cleandata)): + # fix headers + cleandata[0] = cleandata[0].lower() + cleandata[0] = cleandata[0].replace('-', '_') + cleandata[0] = cleandata[0].replace('mounted on', 'mounted_on') - # parse the data - raw_output = jc.parsers.universal.sparse_table_parse(cleandata) + # parse the data + raw_output = jc.parsers.universal.sparse_table_parse(cleandata) if raw: return raw_output diff --git a/jc/parsers/free.py b/jc/parsers/free.py index aaf119ec..c6aeeccc 100644 --- a/jc/parsers/free.py +++ b/jc/parsers/free.py @@ -53,7 +53,7 @@ import jc.parsers.universal class info(): - version = '1.0' + version = '1.1' description = 'free command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -122,14 +122,17 @@ def parse(data, raw=False, quiet=False): jc.utils.compatibility(__name__, info.compatible) cleandata = data.splitlines() - cleandata[0] = cleandata[0].lower() - cleandata[0] = cleandata[0].replace('buff/cache', 'buff_cache') - cleandata[0] = 'type ' + cleandata[0] + raw_output = [] - raw_output = jc.parsers.universal.simple_table_parse(cleandata) + if cleandata: + cleandata[0] = cleandata[0].lower() + cleandata[0] = cleandata[0].replace('buff/cache', 'buff_cache') + cleandata[0] = 'type ' + cleandata[0] - for entry in raw_output: - entry['type'] = entry['type'].rstrip(':') + raw_output = jc.parsers.universal.simple_table_parse(cleandata) + + for entry in raw_output: + entry['type'] = entry['type'].rstrip(':') if raw: return raw_output diff --git a/jc/parsers/lsblk.py b/jc/parsers/lsblk.py index 49544d51..b4955191 100644 --- a/jc/parsers/lsblk.py +++ b/jc/parsers/lsblk.py @@ -216,7 +216,7 @@ import jc.parsers.universal class info(): - version = '1.3' + version = '1.4' description = 'lsblk command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -330,17 +330,20 @@ def parse(data, raw=False, quiet=False): linedata = data.splitlines() # Clear any blank lines cleandata = list(filter(None, linedata)) - cleandata = data.splitlines() + raw_output = [] - cleandata[0] = cleandata[0].lower() - cleandata[0] = cleandata[0].replace(':', '_') - cleandata[0] = cleandata[0].replace('-', '_') + if cleandata: + cleandata = data.splitlines() - raw_output = jc.parsers.universal.sparse_table_parse(cleandata) + cleandata[0] = cleandata[0].lower() + cleandata[0] = cleandata[0].replace(':', '_') + cleandata[0] = cleandata[0].replace('-', '_') - # clean up non-ascii characters, if any - for entry in raw_output: - entry['name'] = entry['name'].encode('ascii', errors='ignore').decode() + raw_output = jc.parsers.universal.sparse_table_parse(cleandata) + + # clean up non-ascii characters, if any + for entry in raw_output: + entry['name'] = entry['name'].encode('ascii', errors='ignore').decode() if raw: return raw_output diff --git a/jc/parsers/lsmod.py b/jc/parsers/lsmod.py index 6b8cf40a..488346af 100644 --- a/jc/parsers/lsmod.py +++ b/jc/parsers/lsmod.py @@ -107,7 +107,7 @@ import jc.parsers.universal class info(): - version = '1.1' + version = '1.2' description = 'lsmod command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -175,13 +175,16 @@ def parse(data, raw=False, quiet=False): jc.utils.compatibility(__name__, info.compatible) cleandata = data.splitlines() - cleandata[0] = cleandata[0].lower() + raw_output = [] - raw_output = jc.parsers.universal.simple_table_parse(cleandata) + if list(filter(None, cleandata)): + cleandata[0] = cleandata[0].lower() - for mod in raw_output: - if 'by' in mod: - mod['by'] = mod['by'].split(',') + raw_output = jc.parsers.universal.simple_table_parse(cleandata) + + for mod in raw_output: + if 'by' in mod: + mod['by'] = mod['by'].split(',') if raw: return raw_output diff --git a/jc/parsers/mount.py b/jc/parsers/mount.py index 3cee262a..c1135802 100644 --- a/jc/parsers/mount.py +++ b/jc/parsers/mount.py @@ -56,7 +56,7 @@ import jc.utils class info(): - version = '1.3' + version = '1.4' description = 'mount command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -162,6 +162,7 @@ def parse(data, raw=False, quiet=False): # Clear any blank lines cleandata = list(filter(None, linedata)) + raw_output = [] if cleandata: # check for OSX output diff --git a/jc/parsers/netstat.py b/jc/parsers/netstat.py index 7547ddb2..d0a9943a 100644 --- a/jc/parsers/netstat.py +++ b/jc/parsers/netstat.py @@ -247,7 +247,7 @@ Examples: class info(): - version = '1.6' + version = '1.7' description = 'netstat command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -435,25 +435,26 @@ def parse(data, raw=False, quiet=False): cleandata = list(filter(None, cleandata)) raw_output = [] - # check for FreeBSD/OSX vs Linux - # is this from FreeBSD/OSX? - if cleandata[0] == 'Active Internet connections' \ - or cleandata[0] == 'Active Internet connections (including servers)' \ - or cleandata[0] == 'Active Multipath Internet connections' \ - or cleandata[0] == 'Active LOCAL (UNIX) domain sockets' \ - or cleandata[0] == 'Registered kernel control modules' \ - or cleandata[0] == 'Active kernel event sockets' \ - or cleandata[0] == 'Active kernel control sockets' \ - or cleandata[0] == 'Routing tables' \ - or cleandata[0].startswith('Name '): + if cleandata: + # check for FreeBSD/OSX vs Linux + # is this from FreeBSD/OSX? + if cleandata[0] == 'Active Internet connections' \ + or cleandata[0] == 'Active Internet connections (including servers)' \ + or cleandata[0] == 'Active Multipath Internet connections' \ + or cleandata[0] == 'Active LOCAL (UNIX) domain sockets' \ + or cleandata[0] == 'Registered kernel control modules' \ + or cleandata[0] == 'Active kernel event sockets' \ + or cleandata[0] == 'Active kernel control sockets' \ + or cleandata[0] == 'Routing tables' \ + or cleandata[0].startswith('Name '): - import jc.parsers.netstat_freebsd_osx - raw_output = jc.parsers.netstat_freebsd_osx.parse(cleandata) + import jc.parsers.netstat_freebsd_osx + raw_output = jc.parsers.netstat_freebsd_osx.parse(cleandata) - # use linux parser - else: - import jc.parsers.netstat_linux - raw_output = jc.parsers.netstat_linux.parse(cleandata) + # use linux parser + else: + import jc.parsers.netstat_linux + raw_output = jc.parsers.netstat_linux.parse(cleandata) if raw: return raw_output diff --git a/jc/parsers/ntpq.py b/jc/parsers/ntpq.py index abcaebaf..3406ea31 100644 --- a/jc/parsers/ntpq.py +++ b/jc/parsers/ntpq.py @@ -183,7 +183,7 @@ import jc.parsers.universal class info(): - version = '1.1' + version = '1.2' description = 'ntpq -p command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -268,28 +268,29 @@ def parse(data, raw=False, quiet=False): if not quiet: jc.utils.compatibility(__name__, info.compatible) + cleandata = data.splitlines() raw_output = [] - cleandata = data.splitlines() - cleandata[0] = 's ' + cleandata[0] - cleandata[0] = cleandata[0].lower() + if list(filter(None, cleandata)): + cleandata[0] = 's ' + cleandata[0] + cleandata[0] = cleandata[0].lower() - # delete header delimiter - del cleandata[1] + # delete header delimiter + del cleandata[1] - # separate first character with a space for easier parsing - for i, line in list(enumerate(cleandata[1:])): - if line[0] == ' ': - # fixup for no-state - cleandata[i + 1] = '~ ' + line[1:] - else: - # fixup - realign columns since we added the 's' column - cleandata[i + 1] = line[:1] + ' ' + line[1:] + # separate first character with a space for easier parsing + for i, line in list(enumerate(cleandata[1:])): + if line[0] == ' ': + # fixup for no-state + cleandata[i + 1] = '~ ' + line[1:] + else: + # fixup - realign columns since we added the 's' column + cleandata[i + 1] = line[:1] + ' ' + line[1:] - # fixup for occaisional ip/hostname fields with a space - cleandata[i + 1] = cleandata[i + 1].replace(' (', '_(') + # fixup for occaisional ip/hostname fields with a space + cleandata[i + 1] = cleandata[i + 1].replace(' (', '_(') - raw_output = jc.parsers.universal.simple_table_parse(cleandata) + raw_output = jc.parsers.universal.simple_table_parse(cleandata) if raw: return raw_output diff --git a/jc/parsers/pip_list.py b/jc/parsers/pip_list.py index ba10d360..8dd25f19 100644 --- a/jc/parsers/pip_list.py +++ b/jc/parsers/pip_list.py @@ -32,7 +32,7 @@ import jc.parsers.universal class info(): - version = '1.1' + version = '1.2' description = 'pip list command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -93,23 +93,24 @@ def parse(data, raw=False, quiet=False): # Clear any blank lines cleandata = list(filter(None, linedata)) - # detect legacy output type - if ' (' in cleandata[0]: - for row in cleandata: - raw_output.append({'package': row.split(' (')[0], - 'version': row.split(' (')[1].rstrip(')')}) + if cleandata: + # detect legacy output type + if ' (' in cleandata[0]: + for row in cleandata: + raw_output.append({'package': row.split(' (')[0], + 'version': row.split(' (')[1].rstrip(')')}) - # otherwise normal table output - else: - # clear separator line - for i, line in reversed(list(enumerate(cleandata))): - if '---' in line: - cleandata.pop(i) + # otherwise normal table output + else: + # clear separator line + for i, line in reversed(list(enumerate(cleandata))): + if '---' in line: + cleandata.pop(i) - cleandata[0] = cleandata[0].lower() + cleandata[0] = cleandata[0].lower() - if cleandata: - raw_output = jc.parsers.universal.simple_table_parse(cleandata) + if cleandata: + raw_output = jc.parsers.universal.simple_table_parse(cleandata) if raw: return raw_output diff --git a/jc/parsers/ps.py b/jc/parsers/ps.py index 1b91275a..24956e53 100644 --- a/jc/parsers/ps.py +++ b/jc/parsers/ps.py @@ -177,7 +177,7 @@ import jc.parsers.universal class info(): - version = '1.1' + version = '1.2' description = 'ps command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -282,9 +282,12 @@ def parse(data, raw=False, quiet=False): jc.utils.compatibility(__name__, info.compatible) cleandata = data.splitlines() - cleandata[0] = cleandata[0].lower() + raw_output = [] - raw_output = jc.parsers.universal.simple_table_parse(cleandata) + if list(filter(None, cleandata)): + cleandata[0] = cleandata[0].lower() + + raw_output = jc.parsers.universal.simple_table_parse(cleandata) if raw: return raw_output diff --git a/jc/parsers/route.py b/jc/parsers/route.py index 891714f7..38be7ec7 100644 --- a/jc/parsers/route.py +++ b/jc/parsers/route.py @@ -84,7 +84,7 @@ import jc.parsers.universal class info(): - version = '1.1' + version = '1.2' description = 'route command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -182,9 +182,12 @@ def parse(data, raw=False, quiet=False): jc.utils.compatibility(__name__, info.compatible) cleandata = data.splitlines()[1:] - cleandata[0] = cleandata[0].lower() + raw_output = [] - raw_output = jc.parsers.universal.simple_table_parse(cleandata) + if list(filter(None, cleandata)): + cleandata[0] = cleandata[0].lower() + + raw_output = jc.parsers.universal.simple_table_parse(cleandata) if raw: return raw_output diff --git a/jc/parsers/ss.py b/jc/parsers/ss.py index 13ac4166..f2c804fa 100644 --- a/jc/parsers/ss.py +++ b/jc/parsers/ss.py @@ -251,7 +251,7 @@ import jc.utils class info(): - version = '1.0' + version = '1.1' description = 'ss command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -308,17 +308,17 @@ def process(proc_data): except (ValueError): entry[key] = None - if 'local_port' in entry: + if 'local_port' in entry: try: entry['local_port_num'] = int(entry['local_port']) except (ValueError): pass - if 'peer_port' in entry: - try: - entry['peer_port_num'] = int(entry['peer_port']) - except (ValueError): - pass + if 'peer_port' in entry: + try: + entry['peer_port_num'] = int(entry['peer_port']) + except (ValueError): + pass return proc_data diff --git a/jc/parsers/systemctl.py b/jc/parsers/systemctl.py index 3f6f7074..ff434b29 100644 --- a/jc/parsers/systemctl.py +++ b/jc/parsers/systemctl.py @@ -40,7 +40,7 @@ import jc.utils class info(): - version = '1.1' + version = '1.2' description = 'systemctl command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -99,24 +99,27 @@ def parse(data, raw=False, quiet=False): linedata = data.splitlines() # Clear any blank lines linedata = list(filter(None, linedata)) - # clean up non-ascii characters, if any - cleandata = [] - for entry in linedata: - cleandata.append(entry.encode('ascii', errors='ignore').decode()) - - header_text = cleandata[0] - header_list = header_text.lower().split() - raw_output = [] - for entry in cleandata[1:]: - if 'LOAD = ' in entry: - break + if linedata: + # clean up non-ascii characters, if any + cleandata = [] + for entry in linedata: + cleandata.append(entry.encode('ascii', errors='ignore').decode()) - else: - entry_list = entry.rstrip().split(maxsplit=4) - output_line = dict(zip(header_list, entry_list)) - raw_output.append(output_line) + header_text = cleandata[0] + header_list = header_text.lower().split() + + raw_output = [] + + for entry in cleandata[1:]: + if 'LOAD = ' in entry: + break + + else: + entry_list = entry.rstrip().split(maxsplit=4) + output_line = dict(zip(header_list, entry_list)) + raw_output.append(output_line) if raw: return raw_output diff --git a/jc/parsers/systemctl_lj.py b/jc/parsers/systemctl_lj.py index ee3d0ba9..ab0d5065 100644 --- a/jc/parsers/systemctl_lj.py +++ b/jc/parsers/systemctl_lj.py @@ -59,7 +59,7 @@ import jc.utils class info(): - version = '1.1' + version = '1.2' description = 'systemctl list-jobs command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -125,25 +125,29 @@ def parse(data, raw=False, quiet=False): linedata = data.splitlines() # Clear any blank lines linedata = list(filter(None, linedata)) - # clean up non-ascii characters, if any - cleandata = [] - for entry in linedata: - cleandata.append(entry.encode('ascii', errors='ignore').decode()) - - header_text = cleandata[0] - header_text = header_text.lower() - header_list = header_text.split() - raw_output = [] - for entry in cleandata[1:]: - if 'No jobs running.' in entry or 'jobs listed.' in entry: - break + if linedata: + cleandata = [] - else: - entry_list = entry.split(maxsplit=4) - output_line = dict(zip(header_list, entry_list)) - raw_output.append(output_line) + # clean up non-ascii characters, if any + for entry in linedata: + cleandata.append(entry.encode('ascii', errors='ignore').decode()) + + header_text = cleandata[0] + header_text = header_text.lower() + header_list = header_text.split() + + raw_output = [] + + for entry in cleandata[1:]: + if 'No jobs running.' in entry or 'jobs listed.' in entry: + break + + else: + entry_list = entry.split(maxsplit=4) + output_line = dict(zip(header_list, entry_list)) + raw_output.append(output_line) if raw: return raw_output diff --git a/jc/parsers/systemctl_ls.py b/jc/parsers/systemctl_ls.py index a712460f..8592759f 100644 --- a/jc/parsers/systemctl_ls.py +++ b/jc/parsers/systemctl_ls.py @@ -34,7 +34,7 @@ import jc.utils class info(): - version = '1.1' + version = '1.2' description = 'systemctl list-sockets command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -91,24 +91,27 @@ def parse(data, raw=False, quiet=False): linedata = data.splitlines() # Clear any blank lines linedata = list(filter(None, linedata)) - # clean up non-ascii characters, if any - cleandata = [] - for entry in linedata: - cleandata.append(entry.encode('ascii', errors='ignore').decode()) - - header_text = cleandata[0].lower() - header_list = header_text.split() - raw_output = [] - for entry in cleandata[1:]: - if 'sockets listed.' in entry: - break + if linedata: + cleandata = [] + # clean up non-ascii characters, if any + for entry in linedata: + cleandata.append(entry.encode('ascii', errors='ignore').decode()) - else: - entry_list = entry.rsplit(maxsplit=2) - output_line = dict(zip(header_list, entry_list)) - raw_output.append(output_line) + header_text = cleandata[0].lower() + header_list = header_text.split() + + raw_output = [] + + for entry in cleandata[1:]: + if 'sockets listed.' in entry: + break + + else: + entry_list = entry.rsplit(maxsplit=2) + output_line = dict(zip(header_list, entry_list)) + raw_output.append(output_line) if raw: return raw_output diff --git a/jc/parsers/systemctl_luf.py b/jc/parsers/systemctl_luf.py index 6876b04c..b20c36e2 100644 --- a/jc/parsers/systemctl_luf.py +++ b/jc/parsers/systemctl_luf.py @@ -31,7 +31,7 @@ import jc.utils class info(): - version = '1.1' + version = '1.2' description = 'systemctl list-unit-files command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -87,25 +87,28 @@ def parse(data, raw=False, quiet=False): linedata = data.splitlines() # Clear any blank lines linedata = list(filter(None, linedata)) - # clean up non-ascii characters, if any - cleandata = [] - for entry in linedata: - cleandata.append(entry.encode('ascii', errors='ignore').decode()) - - header_text = cleandata[0] - header_text = header_text.lower().replace('unit file', 'unit_file') - header_list = header_text.split() - raw_output = [] - for entry in cleandata[1:]: - if 'unit files listed.' in entry: - break + if linedata: + cleandata = [] + # clean up non-ascii characters, if any + for entry in linedata: + cleandata.append(entry.encode('ascii', errors='ignore').decode()) - else: - entry_list = entry.split(maxsplit=4) - output_line = dict(zip(header_list, entry_list)) - raw_output.append(output_line) + header_text = cleandata[0] + header_text = header_text.lower().replace('unit file', 'unit_file') + header_list = header_text.split() + + raw_output = [] + + for entry in cleandata[1:]: + if 'unit files listed.' in entry: + break + + else: + entry_list = entry.split(maxsplit=4) + output_line = dict(zip(header_list, entry_list)) + raw_output.append(output_line) if raw: return raw_output diff --git a/jc/parsers/uptime.py b/jc/parsers/uptime.py index bf0bc2c5..5ada7811 100644 --- a/jc/parsers/uptime.py +++ b/jc/parsers/uptime.py @@ -34,7 +34,7 @@ import jc.utils class info(): - version = '1.0' + version = '1.1' description = 'uptime command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -107,10 +107,9 @@ def parse(data, raw=False, quiet=False): jc.utils.compatibility(__name__, info.compatible) raw_output = {} - cleandata = data.splitlines() - if cleandata: + if list(filter(None, cleandata)): parsed_line = cleandata[0].split() # allow space for odd times diff --git a/jc/parsers/w.py b/jc/parsers/w.py index a8979c56..ceb11e15 100644 --- a/jc/parsers/w.py +++ b/jc/parsers/w.py @@ -83,7 +83,7 @@ import jc.utils class info(): - version = '1.1' + version = '1.2' description = 'w command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -149,36 +149,39 @@ def parse(data, raw=False, quiet=False): jc.utils.compatibility(__name__, info.compatible) cleandata = data.splitlines()[1:] - header_text = cleandata[0].lower() - # fixup for 'from' column that can be blank - from_col = header_text.find('from') - # clean up 'login@' header - # even though @ in a key is valid json, it can make things difficult - header_text = header_text.replace('login@', 'login_at') - headers = [h for h in ' '.join(header_text.strip().split()).split() if h] - - # parse lines raw_output = [] - if cleandata: - for entry in cleandata[1:]: - output_line = {} - # normalize data by inserting Null for missing data - temp_line = entry.split(maxsplit=len(headers) - 1) + if list(filter(None, cleandata)): + header_text = cleandata[0].lower() + # fixup for 'from' column that can be blank + from_col = header_text.find('from') + # clean up 'login@' header + # even though @ in a key is valid json, it can make things difficult + header_text = header_text.replace('login@', 'login_at') + headers = [h for h in ' '.join(header_text.strip().split()).split() if h] - # fix from column, always at column 2 - if 'from' in headers: - if entry[from_col] in string.whitespace: - temp_line.insert(2, '-') + # parse lines + raw_output = [] + if cleandata: + for entry in cleandata[1:]: + output_line = {} - output_line = dict(zip(headers, temp_line)) - raw_output.append(output_line) + # normalize data by inserting Null for missing data + temp_line = entry.split(maxsplit=len(headers) - 1) - # strip whitespace from beginning and end of all string values - for row in raw_output: - for item in row: - if isinstance(row[item], str): - row[item] = row[item].strip() + # fix from column, always at column 2 + if 'from' in headers: + if entry[from_col] in string.whitespace: + temp_line.insert(2, '-') + + output_line = dict(zip(headers, temp_line)) + raw_output.append(output_line) + + # strip whitespace from beginning and end of all string values + for row in raw_output: + for item in row: + if isinstance(row[item], str): + row[item] = row[item].strip() if raw: return raw_output diff --git a/jc/parsers/xml.py b/jc/parsers/xml.py index 5853421a..4e5dece1 100644 --- a/jc/parsers/xml.py +++ b/jc/parsers/xml.py @@ -59,7 +59,7 @@ import xmltodict class info(): - version = '1.0' + version = '1.1' description = 'XML file parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -111,7 +111,9 @@ def parse(data, raw=False, quiet=False): if not quiet: jc.utils.compatibility(__name__, info.compatible) - if data: + raw_output = [] + + if list(filter(None, data.splitlines())): raw_output = xmltodict.parse(data) if raw: diff --git a/setup.py b/setup.py index 0d83a07b..9786ef10 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md', 'r') as f: setuptools.setup( name='jc', - version='1.11.4', + version='1.11.5', author='Kelly Brazil', author_email='kellyjonbrazil@gmail.com', description='Converts the output of popular command-line tools and file-types to JSON.', diff --git a/tests/fixtures/centos-7.7/ss-sudo-a.json b/tests/fixtures/centos-7.7/ss-sudo-a.json index 4454b35f..3e781c6d 100644 --- a/tests/fixtures/centos-7.7/ss-sudo-a.json +++ b/tests/fixtures/centos-7.7/ss-sudo-a.json @@ -1 +1 @@ -[{"netid": "nl", "state": "UNCONN", "recv_q": 768, "send_q": 0, "peer_address": "*", "pid": 1220, "channel": "rtnl:dockerd-current"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "rtnl:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "rtnl:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "rtnl:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 4352, "send_q": 0, "peer_address": "*", "pid": 11360, "channel": "tcpdiag:ss"}, {"netid": "nl", "state": "UNCONN", "recv_q": 768, "send_q": 0, "peer_address": "*", "channel": "tcpdiag:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1220, "channel": "xfrm:dockerd-current"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "xfrm:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "selinux:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "selinux:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 787, "channel": "selinux:dbus-daemon"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 787, "channel": "selinux:dbus-daemon"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "selinux:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "audit:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 754, "channel": "audit:auditd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 11358, "channel": "audit:sudo"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "audit:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "fiblookup:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "connector:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "nft:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1218, "channel": "uevent:tuned"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4118"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4120"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4107"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 783, "channel": "uevent:systemd-logind"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4117"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "uevent:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4119"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1218, "channel": "uevent:tuned"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4120"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "uevent:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4119"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4118"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4117"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 783, "channel": "uevent:systemd-logind"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4107"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "genl:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "genl:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "scsi-trans:kernel"}, {"netid": "p_raw", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "link_layer": "*", "interface": "ens33"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "8971", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/notify"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "8973", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/cgroups-agent"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "8981", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "22040", "peer_address": "*", "peer_port": "0", "path": "/var/run/docker.sock"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "8984", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/socket"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "8986", "peer_address": "*", "peer_port": "0", "path": "/dev/log"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22610", "peer_address": "*", "peer_port": "0", "path": "public/pickup"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22623", "peer_address": "*", "peer_port": "0", "path": "private/tlsmgr"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 10, "local_port": "20787", "peer_address": "*", "peer_port": "0", "path": "/var/run/NetworkManager/private-dhcp"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "23141", "peer_address": "*", "peer_port": "0", "path": "/run/docker/libnetwork/35ee6333bf93cc6652841e66c2c6dfb2e0a14ff20208fe6c4ad28a33dad48423.sock"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "17775", "peer_address": "*", "peer_port": "0", "path": "/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22616", "peer_address": "*", "peer_port": "0", "path": "public/cleanup"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14206", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/shutdownd"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22619", "peer_address": "*", "peer_port": "0", "path": "public/qmgr"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22644", "peer_address": "*", "peer_port": "0", "path": "public/flush"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "14005", "peer_address": "*", "peer_port": "0", "path": "/run/lvm/lvmetad.socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "14021", "peer_address": "*", "peer_port": "0", "path": "/run/lvm/lvmpolld.socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22659", "peer_address": "*", "peer_port": "0", "path": "public/showq"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18375", "peer_address": "*", "peer_port": "0", "path": "/var/run/chrony/chronyd.sock"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22629", "peer_address": "*", "peer_port": "0", "path": "private/rewrite"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22632", "peer_address": "*", "peer_port": "0", "path": "private/bounce"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22635", "peer_address": "*", "peer_port": "0", "path": "private/defer"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22638", "peer_address": "*", "peer_port": "0", "path": "private/trace"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22641", "peer_address": "*", "peer_port": "0", "path": "private/verify"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22647", "peer_address": "*", "peer_port": "0", "path": "private/proxymap"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "13776", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/private"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22650", "peer_address": "*", "peer_port": "0", "path": "private/proxywrite"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22653", "peer_address": "*", "peer_port": "0", "path": "private/smtp"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22656", "peer_address": "*", "peer_port": "0", "path": "private/relay"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22662", "peer_address": "*", "peer_port": "0", "path": "private/error"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22665", "peer_address": "*", "peer_port": "0", "path": "private/retry"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22668", "peer_address": "*", "peer_port": "0", "path": "private/discard"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22673", "peer_address": "*", "peer_port": "0", "path": "private/local"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22676", "peer_address": "*", "peer_port": "0", "path": "private/virtual"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22679", "peer_address": "*", "peer_port": "0", "path": "private/lmtp"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22682", "peer_address": "*", "peer_port": "0", "path": "private/anvil"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22685", "peer_address": "*", "peer_port": "0", "path": "private/scache"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "22259", "peer_address": "*", "peer_port": "0", "path": "/var/run/docker/libcontainerd/docker-containerd.sock"}, {"netid": "u_seq", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "13820", "peer_address": "*", "peer_port": "0", "path": "/run/udev/control"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22658", "peer_address": "*", "peer_port": "22657", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "19150", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19064", "peer_address": "*", "peer_port": "19063", "path": "/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22657", "peer_address": "*", "peer_port": "22658", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21607", "peer_address": "*", "peer_port": "21606", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22660", "peer_address": "*", "peer_port": "22661", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19176", "peer_address": "*", "peer_port": "19175", "path": "/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21606", "peer_address": "*", "peer_port": "21607", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "14820", "peer_address": "*", "peer_port": "14821", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22661", "peer_address": "*", "peer_port": "22660", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18334", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "17615", "peer_address": "*", "peer_port": "17614", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14877", "peer_address": "*", "peer_port": "14878", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22663", "peer_address": "*", "peer_port": "22664", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14878", "peer_address": "*", "peer_port": "14877", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18347", "peer_address": "*", "peer_port": "18416", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "63240", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18416", "peer_address": "*", "peer_port": "18347", "path": "/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21589", "peer_address": "*", "peer_port": "21590", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18181", "peer_address": "*", "peer_port": "18180", "path": "/run/systemd/journal/stdout"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14846", "peer_address": "*", "peer_port": "8984", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "108562", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22652", "peer_address": "*", "peer_port": "22651", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "19253", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22651", "peer_address": "*", "peer_port": "22652", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18180", "peer_address": "*", "peer_port": "18181", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18817", "peer_address": "*", "peer_port": "18818", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22654", "peer_address": "*", "peer_port": "22655", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22655", "peer_address": "*", "peer_port": "22654", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22645", "peer_address": "*", "peer_port": "22646", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21590", "peer_address": "*", "peer_port": "21589", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22646", "peer_address": "*", "peer_port": "22645", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22649", "peer_address": "*", "peer_port": "22648", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22648", "peer_address": "*", "peer_port": "22649", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18818", "peer_address": "*", "peer_port": "18817", "path": "/run/systemd/journal/stdout"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "62145", "peer_address": "*", "peer_port": "8984", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "63245", "peer_address": "*", "peer_port": "63246", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22637", "peer_address": "*", "peer_port": "22636", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "63246", "peer_address": "*", "peer_port": "63245", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22636", "peer_address": "*", "peer_port": "22637", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "14821", "peer_address": "*", "peer_port": "14820", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22639", "peer_address": "*", "peer_port": "22640", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19063", "peer_address": "*", "peer_port": "19064", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19175", "peer_address": "*", "peer_port": "19176", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18390", "peer_address": "*", "peer_port": "18417", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22640", "peer_address": "*", "peer_port": "22639", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22643", "peer_address": "*", "peer_port": "22642", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22642", "peer_address": "*", "peer_port": "22643", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "107686", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20820", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22618", "peer_address": "*", "peer_port": "22617", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "21745", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22617", "peer_address": "*", "peer_port": "22618", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22464", "peer_address": "*", "peer_port": "22463", "path": "/var/run/docker/libcontainerd/docker-containerd.sock"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "20314", "peer_address": "*", "peer_port": "20315", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18299", "peer_address": "*", "peer_port": "18300", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "20315", "peer_address": "*", "peer_port": "20314", "path": "/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18300", "peer_address": "*", "peer_port": "18299", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22463", "peer_address": "*", "peer_port": "22464", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22633", "peer_address": "*", "peer_port": "22634", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22621", "peer_address": "*", "peer_port": "22620", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22631", "peer_address": "*", "peer_port": "22630", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21741", "peer_address": "*", "peer_port": "21740", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22620", "peer_address": "*", "peer_port": "22621", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14010", "peer_address": "*", "peer_port": "8971", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "14671", "peer_address": "*", "peer_port": "14672", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21740", "peer_address": "*", "peer_port": "21741", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22681", "peer_address": "*", "peer_port": "22680", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18413", "peer_address": "*", "peer_port": "18414", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22680", "peer_address": "*", "peer_port": "22681", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22609", "peer_address": "*", "peer_port": "22608", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18867", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22683", "peer_address": "*", "peer_port": "22684", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18414", "peer_address": "*", "peer_port": "18413", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19127", "peer_address": "*", "peer_port": "19126", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22684", "peer_address": "*", "peer_port": "22683", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22614", "peer_address": "*", "peer_port": "22613", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "14672", "peer_address": "*", "peer_port": "14671", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22687", "peer_address": "*", "peer_port": "22686", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22634", "peer_address": "*", "peer_port": "22633", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22613", "peer_address": "*", "peer_port": "22614", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22686", "peer_address": "*", "peer_port": "22687", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22608", "peer_address": "*", "peer_port": "22609", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19126", "peer_address": "*", "peer_port": "19127", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22628", "peer_address": "*", "peer_port": "22627", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22675", "peer_address": "*", "peer_port": "22674", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22674", "peer_address": "*", "peer_port": "22675", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22765", "peer_address": "*", "peer_port": "22766", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22677", "peer_address": "*", "peer_port": "22678", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18896", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22627", "peer_address": "*", "peer_port": "22628", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22766", "peer_address": "*", "peer_port": "22765", "path": "/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "17614", "peer_address": "*", "peer_port": "17615", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22678", "peer_address": "*", "peer_port": "22677", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18318", "peer_address": "*", "peer_port": "8984", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22793", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18415", "peer_address": "*", "peer_port": "18302", "path": "/run/dbus/system_bus_socket"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22030", "peer_address": "*", "peer_port": "8984", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22664", "peer_address": "*", "peer_port": "22663", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18302", "peer_address": "*", "peer_port": "18415", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22667", "peer_address": "*", "peer_port": "22666", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18417", "peer_address": "*", "peer_port": "18390", "path": "/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22666", "peer_address": "*", "peer_port": "22667", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22581", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "23190", "peer_address": "*", "peer_port": "23191", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22669", "peer_address": "*", "peer_port": "22670", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22630", "peer_address": "*", "peer_port": "22631", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22715", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "17605", "peer_address": "*", "peer_port": "8986", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22670", "peer_address": "*", "peer_port": "22669", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "23191", "peer_address": "*", "peer_port": "23190", "path": "/run/dbus/system_bus_socket"}, {"netid": "raw", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "[::]", "local_port": "ipv6-icmp", "peer_address": "[::]", "peer_port": "*"}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "*", "local_port": "bootpc", "peer_address": "*", "peer_port": "*"}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "127.0.0.1", "local_port": "323", "peer_address": "*", "peer_port": "*"}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "[::1]", "local_port": "323", "peer_address": "[::]", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_address": "127.0.0.1", "local_port": "smtp", "peer_address": "*", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "*", "local_port": "ssh", "peer_address": "*", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_address": "[::1]", "local_port": "smtp", "peer_address": "[::]", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "[::]", "local_port": "ssh", "peer_address": "[::]", "peer_port": "*"}, {"netid": "tcp", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_address": "[::1]", "local_port": "ssh", "peer_address": "[::1]", "peer_port": "38134"}, {"netid": "tcp", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_address": "[::1]", "local_port": "38134", "peer_address": "[::1]", "peer_port": "ssh", "local_port_num": 38134}] +[{"netid": "nl", "state": "UNCONN", "recv_q": 768, "send_q": 0, "peer_address": "*", "pid": 1220, "channel": "rtnl:dockerd-current"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "rtnl:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "rtnl:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "rtnl:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 4352, "send_q": 0, "peer_address": "*", "pid": 11360, "channel": "tcpdiag:ss"}, {"netid": "nl", "state": "UNCONN", "recv_q": 768, "send_q": 0, "peer_address": "*", "channel": "tcpdiag:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1220, "channel": "xfrm:dockerd-current"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "xfrm:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "selinux:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "selinux:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 787, "channel": "selinux:dbus-daemon"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 787, "channel": "selinux:dbus-daemon"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "selinux:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "audit:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 754, "channel": "audit:auditd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 11358, "channel": "audit:sudo"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "audit:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "fiblookup:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "connector:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "nft:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1218, "channel": "uevent:tuned"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4118"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4120"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4107"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 783, "channel": "uevent:systemd-logind"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4117"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "uevent:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4119"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1218, "channel": "uevent:tuned"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4120"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "uevent:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4119"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4118"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4117"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 783, "channel": "uevent:systemd-logind"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-4107"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "genl:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 878, "channel": "genl:NetworkManager"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "scsi-trans:kernel"}, {"netid": "p_raw", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "link_layer": "*", "interface": "ens33"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "8971", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/notify", "local_port_num": 8971, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "8973", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/cgroups-agent", "local_port_num": 8973, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "8981", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/stdout", "local_port_num": 8981, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "22040", "peer_address": "*", "peer_port": "0", "path": "/var/run/docker.sock", "local_port_num": 22040, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "8984", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/socket", "local_port_num": 8984, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "8986", "peer_address": "*", "peer_port": "0", "path": "/dev/log", "local_port_num": 8986, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22610", "peer_address": "*", "peer_port": "0", "path": "public/pickup", "local_port_num": 22610, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22623", "peer_address": "*", "peer_port": "0", "path": "private/tlsmgr", "local_port_num": 22623, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 10, "local_port": "20787", "peer_address": "*", "peer_port": "0", "path": "/var/run/NetworkManager/private-dhcp", "local_port_num": 20787, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "23141", "peer_address": "*", "peer_port": "0", "path": "/run/docker/libnetwork/35ee6333bf93cc6652841e66c2c6dfb2e0a14ff20208fe6c4ad28a33dad48423.sock", "local_port_num": 23141, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "17775", "peer_address": "*", "peer_port": "0", "path": "/run/dbus/system_bus_socket", "local_port_num": 17775, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22616", "peer_address": "*", "peer_port": "0", "path": "public/cleanup", "local_port_num": 22616, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14206", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/shutdownd", "local_port_num": 14206, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22619", "peer_address": "*", "peer_port": "0", "path": "public/qmgr", "local_port_num": 22619, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22644", "peer_address": "*", "peer_port": "0", "path": "public/flush", "local_port_num": 22644, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "14005", "peer_address": "*", "peer_port": "0", "path": "/run/lvm/lvmetad.socket", "local_port_num": 14005, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "14021", "peer_address": "*", "peer_port": "0", "path": "/run/lvm/lvmpolld.socket", "local_port_num": 14021, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22659", "peer_address": "*", "peer_port": "0", "path": "public/showq", "local_port_num": 22659, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18375", "peer_address": "*", "peer_port": "0", "path": "/var/run/chrony/chronyd.sock", "local_port_num": 18375, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22629", "peer_address": "*", "peer_port": "0", "path": "private/rewrite", "local_port_num": 22629, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22632", "peer_address": "*", "peer_port": "0", "path": "private/bounce", "local_port_num": 22632, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22635", "peer_address": "*", "peer_port": "0", "path": "private/defer", "local_port_num": 22635, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22638", "peer_address": "*", "peer_port": "0", "path": "private/trace", "local_port_num": 22638, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22641", "peer_address": "*", "peer_port": "0", "path": "private/verify", "local_port_num": 22641, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22647", "peer_address": "*", "peer_port": "0", "path": "private/proxymap", "local_port_num": 22647, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "13776", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/private", "local_port_num": 13776, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22650", "peer_address": "*", "peer_port": "0", "path": "private/proxywrite", "local_port_num": 22650, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22653", "peer_address": "*", "peer_port": "0", "path": "private/smtp", "local_port_num": 22653, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22656", "peer_address": "*", "peer_port": "0", "path": "private/relay", "local_port_num": 22656, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22662", "peer_address": "*", "peer_port": "0", "path": "private/error", "local_port_num": 22662, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22665", "peer_address": "*", "peer_port": "0", "path": "private/retry", "local_port_num": 22665, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22668", "peer_address": "*", "peer_port": "0", "path": "private/discard", "local_port_num": 22668, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22673", "peer_address": "*", "peer_port": "0", "path": "private/local", "local_port_num": 22673, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22676", "peer_address": "*", "peer_port": "0", "path": "private/virtual", "local_port_num": 22676, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22679", "peer_address": "*", "peer_port": "0", "path": "private/lmtp", "local_port_num": 22679, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22682", "peer_address": "*", "peer_port": "0", "path": "private/anvil", "local_port_num": 22682, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_port": "22685", "peer_address": "*", "peer_port": "0", "path": "private/scache", "local_port_num": 22685, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "22259", "peer_address": "*", "peer_port": "0", "path": "/var/run/docker/libcontainerd/docker-containerd.sock", "local_port_num": 22259, "peer_port_num": 0}, {"netid": "u_seq", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "13820", "peer_address": "*", "peer_port": "0", "path": "/run/udev/control", "local_port_num": 13820, "peer_port_num": 0}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22658", "peer_address": "*", "peer_port": "22657", "path": "*", "local_port_num": 22658, "peer_port_num": 22657}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "19150", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 19150, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19064", "peer_address": "*", "peer_port": "19063", "path": "/run/dbus/system_bus_socket", "local_port_num": 19064, "peer_port_num": 19063}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22657", "peer_address": "*", "peer_port": "22658", "path": "*", "local_port_num": 22657, "peer_port_num": 22658}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21607", "peer_address": "*", "peer_port": "21606", "path": "/run/systemd/journal/stdout", "local_port_num": 21607, "peer_port_num": 21606}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22660", "peer_address": "*", "peer_port": "22661", "path": "*", "local_port_num": 22660, "peer_port_num": 22661}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19176", "peer_address": "*", "peer_port": "19175", "path": "/run/dbus/system_bus_socket", "local_port_num": 19176, "peer_port_num": 19175}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21606", "peer_address": "*", "peer_port": "21607", "path": "*", "local_port_num": 21606, "peer_port_num": 21607}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "14820", "peer_address": "*", "peer_port": "14821", "path": "*", "local_port_num": 14820, "peer_port_num": 14821}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22661", "peer_address": "*", "peer_port": "22660", "path": "*", "local_port_num": 22661, "peer_port_num": 22660}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18334", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 18334, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "17615", "peer_address": "*", "peer_port": "17614", "path": "*", "local_port_num": 17615, "peer_port_num": 17614}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14877", "peer_address": "*", "peer_port": "14878", "path": "*", "local_port_num": 14877, "peer_port_num": 14878}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22663", "peer_address": "*", "peer_port": "22664", "path": "*", "local_port_num": 22663, "peer_port_num": 22664}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14878", "peer_address": "*", "peer_port": "14877", "path": "*", "local_port_num": 14878, "peer_port_num": 14877}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18347", "peer_address": "*", "peer_port": "18416", "path": "*", "local_port_num": 18347, "peer_port_num": 18416}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "63240", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 63240, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18416", "peer_address": "*", "peer_port": "18347", "path": "/run/dbus/system_bus_socket", "local_port_num": 18416, "peer_port_num": 18347}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21589", "peer_address": "*", "peer_port": "21590", "path": "*", "local_port_num": 21589, "peer_port_num": 21590}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18181", "peer_address": "*", "peer_port": "18180", "path": "/run/systemd/journal/stdout", "local_port_num": 18181, "peer_port_num": 18180}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14846", "peer_address": "*", "peer_port": "8984", "path": "*", "local_port_num": 14846, "peer_port_num": 8984}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "108562", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 108562, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22652", "peer_address": "*", "peer_port": "22651", "path": "*", "local_port_num": 22652, "peer_port_num": 22651}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "19253", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 19253, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22651", "peer_address": "*", "peer_port": "22652", "path": "*", "local_port_num": 22651, "peer_port_num": 22652}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18180", "peer_address": "*", "peer_port": "18181", "path": "*", "local_port_num": 18180, "peer_port_num": 18181}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18817", "peer_address": "*", "peer_port": "18818", "path": "*", "local_port_num": 18817, "peer_port_num": 18818}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22654", "peer_address": "*", "peer_port": "22655", "path": "*", "local_port_num": 22654, "peer_port_num": 22655}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22655", "peer_address": "*", "peer_port": "22654", "path": "*", "local_port_num": 22655, "peer_port_num": 22654}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22645", "peer_address": "*", "peer_port": "22646", "path": "*", "local_port_num": 22645, "peer_port_num": 22646}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21590", "peer_address": "*", "peer_port": "21589", "path": "/run/systemd/journal/stdout", "local_port_num": 21590, "peer_port_num": 21589}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22646", "peer_address": "*", "peer_port": "22645", "path": "*", "local_port_num": 22646, "peer_port_num": 22645}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22649", "peer_address": "*", "peer_port": "22648", "path": "*", "local_port_num": 22649, "peer_port_num": 22648}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22648", "peer_address": "*", "peer_port": "22649", "path": "*", "local_port_num": 22648, "peer_port_num": 22649}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18818", "peer_address": "*", "peer_port": "18817", "path": "/run/systemd/journal/stdout", "local_port_num": 18818, "peer_port_num": 18817}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "62145", "peer_address": "*", "peer_port": "8984", "path": "*", "local_port_num": 62145, "peer_port_num": 8984}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "63245", "peer_address": "*", "peer_port": "63246", "path": "*", "local_port_num": 63245, "peer_port_num": 63246}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22637", "peer_address": "*", "peer_port": "22636", "path": "*", "local_port_num": 22637, "peer_port_num": 22636}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "63246", "peer_address": "*", "peer_port": "63245", "path": "*", "local_port_num": 63246, "peer_port_num": 63245}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22636", "peer_address": "*", "peer_port": "22637", "path": "*", "local_port_num": 22636, "peer_port_num": 22637}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "14821", "peer_address": "*", "peer_port": "14820", "path": "/run/systemd/journal/stdout", "local_port_num": 14821, "peer_port_num": 14820}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22639", "peer_address": "*", "peer_port": "22640", "path": "*", "local_port_num": 22639, "peer_port_num": 22640}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19063", "peer_address": "*", "peer_port": "19064", "path": "*", "local_port_num": 19063, "peer_port_num": 19064}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19175", "peer_address": "*", "peer_port": "19176", "path": "*", "local_port_num": 19175, "peer_port_num": 19176}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18390", "peer_address": "*", "peer_port": "18417", "path": "*", "local_port_num": 18390, "peer_port_num": 18417}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22640", "peer_address": "*", "peer_port": "22639", "path": "*", "local_port_num": 22640, "peer_port_num": 22639}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22643", "peer_address": "*", "peer_port": "22642", "path": "*", "local_port_num": 22643, "peer_port_num": 22642}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22642", "peer_address": "*", "peer_port": "22643", "path": "*", "local_port_num": 22642, "peer_port_num": 22643}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "107686", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 107686, "peer_port_num": 8986}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20820", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 20820, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22618", "peer_address": "*", "peer_port": "22617", "path": "*", "local_port_num": 22618, "peer_port_num": 22617}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "21745", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 21745, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22617", "peer_address": "*", "peer_port": "22618", "path": "*", "local_port_num": 22617, "peer_port_num": 22618}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22464", "peer_address": "*", "peer_port": "22463", "path": "/var/run/docker/libcontainerd/docker-containerd.sock", "local_port_num": 22464, "peer_port_num": 22463}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "20314", "peer_address": "*", "peer_port": "20315", "path": "*", "local_port_num": 20314, "peer_port_num": 20315}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18299", "peer_address": "*", "peer_port": "18300", "path": "*", "local_port_num": 18299, "peer_port_num": 18300}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "20315", "peer_address": "*", "peer_port": "20314", "path": "/run/dbus/system_bus_socket", "local_port_num": 20315, "peer_port_num": 20314}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18300", "peer_address": "*", "peer_port": "18299", "path": "/run/systemd/journal/stdout", "local_port_num": 18300, "peer_port_num": 18299}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22463", "peer_address": "*", "peer_port": "22464", "path": "*", "local_port_num": 22463, "peer_port_num": 22464}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22633", "peer_address": "*", "peer_port": "22634", "path": "*", "local_port_num": 22633, "peer_port_num": 22634}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22621", "peer_address": "*", "peer_port": "22620", "path": "*", "local_port_num": 22621, "peer_port_num": 22620}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22631", "peer_address": "*", "peer_port": "22630", "path": "*", "local_port_num": 22631, "peer_port_num": 22630}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21741", "peer_address": "*", "peer_port": "21740", "path": "/run/systemd/journal/stdout", "local_port_num": 21741, "peer_port_num": 21740}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22620", "peer_address": "*", "peer_port": "22621", "path": "*", "local_port_num": 22620, "peer_port_num": 22621}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "14010", "peer_address": "*", "peer_port": "8971", "path": "*", "local_port_num": 14010, "peer_port_num": 8971}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "14671", "peer_address": "*", "peer_port": "14672", "path": "*", "local_port_num": 14671, "peer_port_num": 14672}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21740", "peer_address": "*", "peer_port": "21741", "path": "*", "local_port_num": 21740, "peer_port_num": 21741}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22681", "peer_address": "*", "peer_port": "22680", "path": "*", "local_port_num": 22681, "peer_port_num": 22680}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18413", "peer_address": "*", "peer_port": "18414", "path": "*", "local_port_num": 18413, "peer_port_num": 18414}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22680", "peer_address": "*", "peer_port": "22681", "path": "*", "local_port_num": 22680, "peer_port_num": 22681}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22609", "peer_address": "*", "peer_port": "22608", "path": "*", "local_port_num": 22609, "peer_port_num": 22608}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18867", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 18867, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22683", "peer_address": "*", "peer_port": "22684", "path": "*", "local_port_num": 22683, "peer_port_num": 22684}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18414", "peer_address": "*", "peer_port": "18413", "path": "*", "local_port_num": 18414, "peer_port_num": 18413}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19127", "peer_address": "*", "peer_port": "19126", "path": "/run/systemd/journal/stdout", "local_port_num": 19127, "peer_port_num": 19126}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22684", "peer_address": "*", "peer_port": "22683", "path": "*", "local_port_num": 22684, "peer_port_num": 22683}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22614", "peer_address": "*", "peer_port": "22613", "path": "*", "local_port_num": 22614, "peer_port_num": 22613}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "14672", "peer_address": "*", "peer_port": "14671", "path": "/run/systemd/journal/stdout", "local_port_num": 14672, "peer_port_num": 14671}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22687", "peer_address": "*", "peer_port": "22686", "path": "*", "local_port_num": 22687, "peer_port_num": 22686}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22634", "peer_address": "*", "peer_port": "22633", "path": "*", "local_port_num": 22634, "peer_port_num": 22633}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22613", "peer_address": "*", "peer_port": "22614", "path": "*", "local_port_num": 22613, "peer_port_num": 22614}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22686", "peer_address": "*", "peer_port": "22687", "path": "*", "local_port_num": 22686, "peer_port_num": 22687}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22608", "peer_address": "*", "peer_port": "22609", "path": "*", "local_port_num": 22608, "peer_port_num": 22609}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "19126", "peer_address": "*", "peer_port": "19127", "path": "*", "local_port_num": 19126, "peer_port_num": 19127}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22628", "peer_address": "*", "peer_port": "22627", "path": "*", "local_port_num": 22628, "peer_port_num": 22627}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22675", "peer_address": "*", "peer_port": "22674", "path": "*", "local_port_num": 22675, "peer_port_num": 22674}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22674", "peer_address": "*", "peer_port": "22675", "path": "*", "local_port_num": 22674, "peer_port_num": 22675}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22765", "peer_address": "*", "peer_port": "22766", "path": "*", "local_port_num": 22765, "peer_port_num": 22766}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22677", "peer_address": "*", "peer_port": "22678", "path": "*", "local_port_num": 22677, "peer_port_num": 22678}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18896", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 18896, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22627", "peer_address": "*", "peer_port": "22628", "path": "*", "local_port_num": 22627, "peer_port_num": 22628}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22766", "peer_address": "*", "peer_port": "22765", "path": "/run/dbus/system_bus_socket", "local_port_num": 22766, "peer_port_num": 22765}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "17614", "peer_address": "*", "peer_port": "17615", "path": "*", "local_port_num": 17614, "peer_port_num": 17615}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22678", "peer_address": "*", "peer_port": "22677", "path": "*", "local_port_num": 22678, "peer_port_num": 22677}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "18318", "peer_address": "*", "peer_port": "8984", "path": "*", "local_port_num": 18318, "peer_port_num": 8984}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22793", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 22793, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18415", "peer_address": "*", "peer_port": "18302", "path": "/run/dbus/system_bus_socket", "local_port_num": 18415, "peer_port_num": 18302}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22030", "peer_address": "*", "peer_port": "8984", "path": "*", "local_port_num": 22030, "peer_port_num": 8984}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22664", "peer_address": "*", "peer_port": "22663", "path": "*", "local_port_num": 22664, "peer_port_num": 22663}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18302", "peer_address": "*", "peer_port": "18415", "path": "*", "local_port_num": 18302, "peer_port_num": 18415}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22667", "peer_address": "*", "peer_port": "22666", "path": "*", "local_port_num": 22667, "peer_port_num": 22666}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "18417", "peer_address": "*", "peer_port": "18390", "path": "/run/dbus/system_bus_socket", "local_port_num": 18417, "peer_port_num": 18390}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22666", "peer_address": "*", "peer_port": "22667", "path": "*", "local_port_num": 22666, "peer_port_num": 22667}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22581", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 22581, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "23190", "peer_address": "*", "peer_port": "23191", "path": "*", "local_port_num": 23190, "peer_port_num": 23191}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22669", "peer_address": "*", "peer_port": "22670", "path": "*", "local_port_num": 22669, "peer_port_num": 22670}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22630", "peer_address": "*", "peer_port": "22631", "path": "*", "local_port_num": 22630, "peer_port_num": 22631}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22715", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 22715, "peer_port_num": 8986}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "17605", "peer_address": "*", "peer_port": "8986", "path": "*", "local_port_num": 17605, "peer_port_num": 8986}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "22670", "peer_address": "*", "peer_port": "22669", "path": "*", "local_port_num": 22670, "peer_port_num": 22669}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "23191", "peer_address": "*", "peer_port": "23190", "path": "/run/dbus/system_bus_socket", "local_port_num": 23191, "peer_port_num": 23190}, {"netid": "raw", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "[::]", "local_port": "ipv6-icmp", "peer_address": "[::]", "peer_port": "*"}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "*", "local_port": "bootpc", "peer_address": "*", "peer_port": "*"}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "127.0.0.1", "local_port": "323", "peer_address": "*", "peer_port": "*", "local_port_num": 323}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "[::1]", "local_port": "323", "peer_address": "[::]", "peer_port": "*", "local_port_num": 323}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_address": "127.0.0.1", "local_port": "smtp", "peer_address": "*", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "*", "local_port": "ssh", "peer_address": "*", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 100, "local_address": "[::1]", "local_port": "smtp", "peer_address": "[::]", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "[::]", "local_port": "ssh", "peer_address": "[::]", "peer_port": "*"}, {"netid": "tcp", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_address": "[::1]", "local_port": "ssh", "peer_address": "[::1]", "peer_port": "38134", "peer_port_num": 38134}, {"netid": "tcp", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_address": "[::1]", "local_port": "38134", "peer_address": "[::1]", "peer_port": "ssh", "local_port_num": 38134}] diff --git a/tests/fixtures/ubuntu-18.04/ss-sudo-a.json b/tests/fixtures/ubuntu-18.04/ss-sudo-a.json index 1931369d..7e794a55 100644 --- a/tests/fixtures/ubuntu-18.04/ss-sudo-a.json +++ b/tests/fixtures/ubuntu-18.04/ss-sudo-a.json @@ -1 +1 @@ -[{"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "rtnl:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 893, "channel": "rtnl:systemd-resolve"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "rtnl:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 893, "channel": "rtnl:systemd-resolve"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "rtnl:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 768, "send_q": 0, "peer_address": "*", "channel": "tcpdiag:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 4352, "send_q": 0, "peer_address": "*", "pid": 25293, "channel": "tcpdiag:ss"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "selinux:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "iscsi:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "audit:-1100095455"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "audit:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 25292, "channel": "audit:sudo"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "audit:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "audit:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "fiblookup:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "connector:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-15116454"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1018, "channel": "uevent:systemd-logind"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 4229, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-866834182"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-1118001981"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-400364679"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 874, "channel": "uevent:systemd-network"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 970, "channel": "uevent:snapd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 4229, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 970, "channel": "uevent:snapd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-400364679"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-866834182"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-1118001981"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1018, "channel": "uevent:systemd-logind"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 874, "channel": "uevent:systemd-network"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-15116454"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "genl:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 874, "channel": "genl:systemd-network"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "scsi-trans:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "rdma:kernel"}, {"netid": "p_raw", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "link_layer": "LLDP", "interface": "ens33"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93066", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/systemd/notify"}, {"netid": "u_seq", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20699", "peer_address": "*", "peer_port": "0", "path": "/run/udev/control"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93069", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/systemd/private"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93073", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.dirmngr"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93074", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.gpg-agent"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93075", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.gpg-agent.extra"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93076", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.gpg-agent.ssh"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93077", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.gpg-agent.browser"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20676", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/notify"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20679", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/private"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20689", "peer_address": "*", "peer_port": "0", "path": "/run/lvm/lvmetad.socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20692", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/stdout"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20694", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20701", "peer_address": "*", "peer_port": "0", "path": "/run/lvm/lvmpolld.socket"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20891", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/syslog"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "21046", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/dev-log"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27320", "peer_address": "*", "peer_port": "0", "path": "/var/lib/lxd/unix.socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 32, "local_port": "25903", "peer_address": "*", "peer_port": "0", "path": "/var/run/vmware/guestServicePipe"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27335", "peer_address": "*", "peer_port": "0", "path": "/run/acpid.socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27345", "peer_address": "*", "peer_port": "0", "path": "/run/snapd.socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27347", "peer_address": "*", "peer_port": "0", "path": "/run/snapd-snap.socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27358", "peer_address": "*", "peer_port": "0", "path": "/var/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27362", "peer_address": "*", "peer_port": "0", "path": "/var/run/docker.sock"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27366", "peer_address": "*", "peer_port": "0", "path": "/run/uuidd/request"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "30955", "peer_address": "*", "peer_port": "0", "path": "/run/containerd/containerd.sock"}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27357", "peer_address": "*", "peer_port": "0", "path": "@ISCSIADM_ABSTRACT_NAMESPACE"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25672", "peer_address": "*", "peer_port": "25671", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29901", "peer_address": "*", "peer_port": "29903", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "25635", "peer_address": "*", "peer_port": "25636", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "25608", "peer_address": "*", "peer_port": "25610", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "93027", "peer_address": "*", "peer_port": "93023", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29596", "peer_address": "*", "peer_port": "29594", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29816", "peer_address": "*", "peer_port": "29515", "path": "/var/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30026", "peer_address": "*", "peer_port": "30140", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93030", "peer_address": "*", "peer_port": "21046", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28214", "peer_address": "*", "peer_port": "28300", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25674", "peer_address": "*", "peer_port": "25673", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25671", "peer_address": "*", "peer_port": "25672", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28301", "peer_address": "*", "peer_port": "28298", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27703", "peer_address": "*", "peer_port": "27780", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29809", "peer_address": "*", "peer_port": "29810", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30839", "peer_address": "*", "peer_port": "30840", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28135", "peer_address": "*", "peer_port": "28299", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25673", "peer_address": "*", "peer_port": "25674", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28299", "peer_address": "*", "peer_port": "28135", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29594", "peer_address": "*", "peer_port": "29596", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30140", "peer_address": "*", "peer_port": "30026", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27623", "peer_address": "*", "peer_port": "27626", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28298", "peer_address": "*", "peer_port": "28301", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21255", "peer_address": "*", "peer_port": "21770", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "29734", "peer_address": "*", "peer_port": "21046", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29903", "peer_address": "*", "peer_port": "29901", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "93023", "peer_address": "*", "peer_port": "93027", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "25636", "peer_address": "*", "peer_port": "25635", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "25610", "peer_address": "*", "peer_port": "25608", "path": "/run/systemd/journal/stdout"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93035", "peer_address": "*", "peer_port": "20694", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29515", "peer_address": "*", "peer_port": "29816", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 4, "send_q": 0, "local_port": "25485", "peer_address": "*", "peer_port": "25486", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28300", "peer_address": "*", "peer_port": "28214", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27780", "peer_address": "*", "peer_port": "27703", "path": "/run/systemd/journal/stdout"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "29808", "peer_address": "*", "peer_port": "21046", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30840", "peer_address": "*", "peer_port": "30839", "path": "/var/run/dbus/system_bus_socket"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "62021", "peer_address": "*", "peer_port": "20694", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29810", "peer_address": "*", "peer_port": "29809", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "92910", "peer_address": "*", "peer_port": "21046", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22601", "peer_address": "*", "peer_port": "22602", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "21485", "peer_address": "*", "peer_port": "20676", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26725", "peer_address": "*", "peer_port": "26726", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20678", "peer_address": "*", "peer_port": "20677", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26709", "peer_address": "*", "peer_port": "20694", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29815", "peer_address": "*", "peer_port": "28703", "path": "/var/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26886", "peer_address": "*", "peer_port": "26820", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30141", "peer_address": "*", "peer_port": "30134", "path": "/run/systemd/journal/stdout"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "21731", "peer_address": "*", "peer_port": "20694", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30635", "peer_address": "*", "peer_port": "30636", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27361", "peer_address": "*", "peer_port": "29811", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93067", "peer_address": "*", "peer_port": "93068", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26726", "peer_address": "*", "peer_port": "26725", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25780", "peer_address": "*", "peer_port": "0", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93068", "peer_address": "*", "peer_port": "93067", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30696", "peer_address": "*", "peer_port": "30695", "path": "/var/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30134", "peer_address": "*", "peer_port": "30141", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29814", "peer_address": "*", "peer_port": "27995", "path": "/var/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27993", "peer_address": "*", "peer_port": "27996", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26820", "peer_address": "*", "peer_port": "26886", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25668", "peer_address": "*", "peer_port": "20694", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21770", "peer_address": "*", "peer_port": "21255", "path": "/run/systemd/journal/stdout"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26959", "peer_address": "*", "peer_port": "20694", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27996", "peer_address": "*", "peer_port": "27993", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28703", "peer_address": "*", "peer_port": "29815", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30695", "peer_address": "*", "peer_port": "30696", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27995", "peer_address": "*", "peer_port": "29814", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29812", "peer_address": "*", "peer_port": "27364", "path": "/var/run/dbus/system_bus_socket"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20677", "peer_address": "*", "peer_port": "20678", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21558", "peer_address": "*", "peer_port": "21775", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30636", "peer_address": "*", "peer_port": "30635", "path": "/var/run/dbus/system_bus_socket"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26667", "peer_address": "*", "peer_port": "26668", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "163478", "peer_address": "*", "peer_port": "21046", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27626", "peer_address": "*", "peer_port": "27623", "path": "/run/systemd/journal/stdout"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "28684", "peer_address": "*", "peer_port": "20694", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26069", "peer_address": "*", "peer_port": "26068", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26068", "peer_address": "*", "peer_port": "26069", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26728", "peer_address": "*", "peer_port": "26727", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26668", "peer_address": "*", "peer_port": "26667", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21775", "peer_address": "*", "peer_port": "21558", "path": "/run/systemd/journal/stdout"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27364", "peer_address": "*", "peer_port": "29812", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 768, "local_port": "25486", "peer_address": "*", "peer_port": "25485", "path": "*"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26727", "peer_address": "*", "peer_port": "26728", "path": "*"}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29811", "peer_address": "*", "peer_port": "27361", "path": "/var/run/dbus/system_bus_socket"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22602", "peer_address": "*", "peer_port": "22601", "path": "*"}, {"netid": "icmp6", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "*", "local_port": "ipv6-icmp", "peer_address": "*", "peer_port": "*", "interface": "ens33"}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "127.0.0.53", "local_port": "domain", "peer_address": "0.0.0.0", "peer_port": "*", "interface": "lo"}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "192.168.71.131", "local_port": "bootpc", "peer_address": "0.0.0.0", "peer_port": "*", "interface": "ens33"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "127.0.0.53", "local_port": "domain", "peer_address": "0.0.0.0", "peer_port": "*", "interface": "lo"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "0.0.0.0", "local_port": "ssh", "peer_address": "0.0.0.0", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "127.0.0.1", "local_port": "35485", "peer_address": "0.0.0.0", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "[::]", "local_port": "ssh", "peer_address": "[::]", "peer_port": "*"}, {"netid": "v_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_address": "999900439", "local_port": "1023", "peer_address": "0", "peer_port": "976", "local_port_num": 1023, "peer_port_num": 976}] +[{"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "rtnl:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 893, "channel": "rtnl:systemd-resolve"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "rtnl:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 893, "channel": "rtnl:systemd-resolve"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "rtnl:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 768, "send_q": 0, "peer_address": "*", "channel": "tcpdiag:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 4352, "send_q": 0, "peer_address": "*", "pid": 25293, "channel": "tcpdiag:ss"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "selinux:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "iscsi:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "audit:-1100095455"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "audit:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 25292, "channel": "audit:sudo"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "audit:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "audit:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "fiblookup:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "connector:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-15116454"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1018, "channel": "uevent:systemd-logind"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 4229, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-866834182"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-1118001981"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-400364679"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 874, "channel": "uevent:systemd-network"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 970, "channel": "uevent:snapd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 4229, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 970, "channel": "uevent:snapd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-400364679"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-866834182"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-1118001981"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1018, "channel": "uevent:systemd-logind"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 874, "channel": "uevent:systemd-network"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "uevent:-15116454"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 1, "channel": "uevent:systemd"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "genl:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "pid": 874, "channel": "genl:systemd-network"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "scsi-trans:kernel"}, {"netid": "nl", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "channel": "rdma:kernel"}, {"netid": "p_raw", "state": "UNCONN", "recv_q": 0, "send_q": 0, "peer_address": "*", "link_layer": "LLDP", "interface": "ens33"}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93066", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/systemd/notify", "local_port_num": 93066, "peer_port_num": 0}, {"netid": "u_seq", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20699", "peer_address": "*", "peer_port": "0", "path": "/run/udev/control", "local_port_num": 20699, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93069", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/systemd/private", "local_port_num": 93069, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93073", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.dirmngr", "local_port_num": 93073, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93074", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.gpg-agent", "local_port_num": 93074, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93075", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.gpg-agent.extra", "local_port_num": 93075, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93076", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.gpg-agent.ssh", "local_port_num": 93076, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "93077", "peer_address": "*", "peer_port": "0", "path": "/run/user/1000/gnupg/S.gpg-agent.browser", "local_port_num": 93077, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20676", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/notify", "local_port_num": 20676, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20679", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/private", "local_port_num": 20679, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20689", "peer_address": "*", "peer_port": "0", "path": "/run/lvm/lvmetad.socket", "local_port_num": 20689, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20692", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/stdout", "local_port_num": 20692, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20694", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/socket", "local_port_num": 20694, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "20701", "peer_address": "*", "peer_port": "0", "path": "/run/lvm/lvmpolld.socket", "local_port_num": 20701, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20891", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/syslog", "local_port_num": 20891, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "21046", "peer_address": "*", "peer_port": "0", "path": "/run/systemd/journal/dev-log", "local_port_num": 21046, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27320", "peer_address": "*", "peer_port": "0", "path": "/var/lib/lxd/unix.socket", "local_port_num": 27320, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 32, "local_port": "25903", "peer_address": "*", "peer_port": "0", "path": "/var/run/vmware/guestServicePipe", "local_port_num": 25903, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27335", "peer_address": "*", "peer_port": "0", "path": "/run/acpid.socket", "local_port_num": 27335, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27345", "peer_address": "*", "peer_port": "0", "path": "/run/snapd.socket", "local_port_num": 27345, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27347", "peer_address": "*", "peer_port": "0", "path": "/run/snapd-snap.socket", "local_port_num": 27347, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27358", "peer_address": "*", "peer_port": "0", "path": "/var/run/dbus/system_bus_socket", "local_port_num": 27358, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27362", "peer_address": "*", "peer_port": "0", "path": "/var/run/docker.sock", "local_port_num": 27362, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27366", "peer_address": "*", "peer_port": "0", "path": "/run/uuidd/request", "local_port_num": 27366, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "30955", "peer_address": "*", "peer_port": "0", "path": "/run/containerd/containerd.sock", "local_port_num": 30955, "peer_port_num": 0}, {"netid": "u_str", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_port": "27357", "peer_address": "*", "peer_port": "0", "path": "@ISCSIADM_ABSTRACT_NAMESPACE", "local_port_num": 27357, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25672", "peer_address": "*", "peer_port": "25671", "path": "*", "local_port_num": 25672, "peer_port_num": 25671}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29901", "peer_address": "*", "peer_port": "29903", "path": "*", "local_port_num": 29901, "peer_port_num": 29903}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "25635", "peer_address": "*", "peer_port": "25636", "path": "*", "local_port_num": 25635, "peer_port_num": 25636}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "25608", "peer_address": "*", "peer_port": "25610", "path": "*", "local_port_num": 25608, "peer_port_num": 25610}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "93027", "peer_address": "*", "peer_port": "93023", "path": "/run/systemd/journal/stdout", "local_port_num": 93027, "peer_port_num": 93023}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29596", "peer_address": "*", "peer_port": "29594", "path": "/run/systemd/journal/stdout", "local_port_num": 29596, "peer_port_num": 29594}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29816", "peer_address": "*", "peer_port": "29515", "path": "/var/run/dbus/system_bus_socket", "local_port_num": 29816, "peer_port_num": 29515}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30026", "peer_address": "*", "peer_port": "30140", "path": "*", "local_port_num": 30026, "peer_port_num": 30140}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93030", "peer_address": "*", "peer_port": "21046", "path": "*", "local_port_num": 93030, "peer_port_num": 21046}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28214", "peer_address": "*", "peer_port": "28300", "path": "*", "local_port_num": 28214, "peer_port_num": 28300}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25674", "peer_address": "*", "peer_port": "25673", "path": "*", "local_port_num": 25674, "peer_port_num": 25673}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25671", "peer_address": "*", "peer_port": "25672", "path": "*", "local_port_num": 25671, "peer_port_num": 25672}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28301", "peer_address": "*", "peer_port": "28298", "path": "/run/systemd/journal/stdout", "local_port_num": 28301, "peer_port_num": 28298}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27703", "peer_address": "*", "peer_port": "27780", "path": "*", "local_port_num": 27703, "peer_port_num": 27780}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29809", "peer_address": "*", "peer_port": "29810", "path": "*", "local_port_num": 29809, "peer_port_num": 29810}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30839", "peer_address": "*", "peer_port": "30840", "path": "*", "local_port_num": 30839, "peer_port_num": 30840}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28135", "peer_address": "*", "peer_port": "28299", "path": "*", "local_port_num": 28135, "peer_port_num": 28299}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25673", "peer_address": "*", "peer_port": "25674", "path": "*", "local_port_num": 25673, "peer_port_num": 25674}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28299", "peer_address": "*", "peer_port": "28135", "path": "/run/systemd/journal/stdout", "local_port_num": 28299, "peer_port_num": 28135}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29594", "peer_address": "*", "peer_port": "29596", "path": "*", "local_port_num": 29594, "peer_port_num": 29596}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30140", "peer_address": "*", "peer_port": "30026", "path": "/run/systemd/journal/stdout", "local_port_num": 30140, "peer_port_num": 30026}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27623", "peer_address": "*", "peer_port": "27626", "path": "*", "local_port_num": 27623, "peer_port_num": 27626}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28298", "peer_address": "*", "peer_port": "28301", "path": "*", "local_port_num": 28298, "peer_port_num": 28301}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21255", "peer_address": "*", "peer_port": "21770", "path": "*", "local_port_num": 21255, "peer_port_num": 21770}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "29734", "peer_address": "*", "peer_port": "21046", "path": "*", "local_port_num": 29734, "peer_port_num": 21046}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29903", "peer_address": "*", "peer_port": "29901", "path": "/run/systemd/journal/stdout", "local_port_num": 29903, "peer_port_num": 29901}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "93023", "peer_address": "*", "peer_port": "93027", "path": "*", "local_port_num": 93023, "peer_port_num": 93027}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "25636", "peer_address": "*", "peer_port": "25635", "path": "/run/systemd/journal/stdout", "local_port_num": 25636, "peer_port_num": 25635}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "25610", "peer_address": "*", "peer_port": "25608", "path": "/run/systemd/journal/stdout", "local_port_num": 25610, "peer_port_num": 25608}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93035", "peer_address": "*", "peer_port": "20694", "path": "*", "local_port_num": 93035, "peer_port_num": 20694}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29515", "peer_address": "*", "peer_port": "29816", "path": "*", "local_port_num": 29515, "peer_port_num": 29816}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 4, "send_q": 0, "local_port": "25485", "peer_address": "*", "peer_port": "25486", "path": "*", "local_port_num": 25485, "peer_port_num": 25486}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28300", "peer_address": "*", "peer_port": "28214", "path": "/run/systemd/journal/stdout", "local_port_num": 28300, "peer_port_num": 28214}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27780", "peer_address": "*", "peer_port": "27703", "path": "/run/systemd/journal/stdout", "local_port_num": 27780, "peer_port_num": 27703}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "29808", "peer_address": "*", "peer_port": "21046", "path": "*", "local_port_num": 29808, "peer_port_num": 21046}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30840", "peer_address": "*", "peer_port": "30839", "path": "/var/run/dbus/system_bus_socket", "local_port_num": 30840, "peer_port_num": 30839}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "62021", "peer_address": "*", "peer_port": "20694", "path": "*", "local_port_num": 62021, "peer_port_num": 20694}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29810", "peer_address": "*", "peer_port": "29809", "path": "*", "local_port_num": 29810, "peer_port_num": 29809}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "92910", "peer_address": "*", "peer_port": "21046", "path": "*", "local_port_num": 92910, "peer_port_num": 21046}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22601", "peer_address": "*", "peer_port": "22602", "path": "*", "local_port_num": 22601, "peer_port_num": 22602}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "21485", "peer_address": "*", "peer_port": "20676", "path": "*", "local_port_num": 21485, "peer_port_num": 20676}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26725", "peer_address": "*", "peer_port": "26726", "path": "*", "local_port_num": 26725, "peer_port_num": 26726}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20678", "peer_address": "*", "peer_port": "20677", "path": "*", "local_port_num": 20678, "peer_port_num": 20677}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26709", "peer_address": "*", "peer_port": "20694", "path": "*", "local_port_num": 26709, "peer_port_num": 20694}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29815", "peer_address": "*", "peer_port": "28703", "path": "/var/run/dbus/system_bus_socket", "local_port_num": 29815, "peer_port_num": 28703}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26886", "peer_address": "*", "peer_port": "26820", "path": "/run/systemd/journal/stdout", "local_port_num": 26886, "peer_port_num": 26820}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30141", "peer_address": "*", "peer_port": "30134", "path": "/run/systemd/journal/stdout", "local_port_num": 30141, "peer_port_num": 30134}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "21731", "peer_address": "*", "peer_port": "20694", "path": "*", "local_port_num": 21731, "peer_port_num": 20694}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30635", "peer_address": "*", "peer_port": "30636", "path": "*", "local_port_num": 30635, "peer_port_num": 30636}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27361", "peer_address": "*", "peer_port": "29811", "path": "*", "local_port_num": 27361, "peer_port_num": 29811}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93067", "peer_address": "*", "peer_port": "93068", "path": "*", "local_port_num": 93067, "peer_port_num": 93068}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26726", "peer_address": "*", "peer_port": "26725", "path": "*", "local_port_num": 26726, "peer_port_num": 26725}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25780", "peer_address": "*", "peer_port": "0", "path": "*", "local_port_num": 25780, "peer_port_num": 0}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "93068", "peer_address": "*", "peer_port": "93067", "path": "*", "local_port_num": 93068, "peer_port_num": 93067}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30696", "peer_address": "*", "peer_port": "30695", "path": "/var/run/dbus/system_bus_socket", "local_port_num": 30696, "peer_port_num": 30695}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30134", "peer_address": "*", "peer_port": "30141", "path": "*", "local_port_num": 30134, "peer_port_num": 30141}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29814", "peer_address": "*", "peer_port": "27995", "path": "/var/run/dbus/system_bus_socket", "local_port_num": 29814, "peer_port_num": 27995}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27993", "peer_address": "*", "peer_port": "27996", "path": "*", "local_port_num": 27993, "peer_port_num": 27996}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26820", "peer_address": "*", "peer_port": "26886", "path": "*", "local_port_num": 26820, "peer_port_num": 26886}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "25668", "peer_address": "*", "peer_port": "20694", "path": "*", "local_port_num": 25668, "peer_port_num": 20694}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21770", "peer_address": "*", "peer_port": "21255", "path": "/run/systemd/journal/stdout", "local_port_num": 21770, "peer_port_num": 21255}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26959", "peer_address": "*", "peer_port": "20694", "path": "*", "local_port_num": 26959, "peer_port_num": 20694}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27996", "peer_address": "*", "peer_port": "27993", "path": "/run/systemd/journal/stdout", "local_port_num": 27996, "peer_port_num": 27993}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "28703", "peer_address": "*", "peer_port": "29815", "path": "*", "local_port_num": 28703, "peer_port_num": 29815}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30695", "peer_address": "*", "peer_port": "30696", "path": "*", "local_port_num": 30695, "peer_port_num": 30696}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27995", "peer_address": "*", "peer_port": "29814", "path": "*", "local_port_num": 27995, "peer_port_num": 29814}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29812", "peer_address": "*", "peer_port": "27364", "path": "/var/run/dbus/system_bus_socket", "local_port_num": 29812, "peer_port_num": 27364}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "20677", "peer_address": "*", "peer_port": "20678", "path": "*", "local_port_num": 20677, "peer_port_num": 20678}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21558", "peer_address": "*", "peer_port": "21775", "path": "*", "local_port_num": 21558, "peer_port_num": 21775}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "30636", "peer_address": "*", "peer_port": "30635", "path": "/var/run/dbus/system_bus_socket", "local_port_num": 30636, "peer_port_num": 30635}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26667", "peer_address": "*", "peer_port": "26668", "path": "*", "local_port_num": 26667, "peer_port_num": 26668}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "163478", "peer_address": "*", "peer_port": "21046", "path": "*", "local_port_num": 163478, "peer_port_num": 21046}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27626", "peer_address": "*", "peer_port": "27623", "path": "/run/systemd/journal/stdout", "local_port_num": 27626, "peer_port_num": 27623}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "28684", "peer_address": "*", "peer_port": "20694", "path": "*", "local_port_num": 28684, "peer_port_num": 20694}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26069", "peer_address": "*", "peer_port": "26068", "path": "/run/systemd/journal/stdout", "local_port_num": 26069, "peer_port_num": 26068}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26068", "peer_address": "*", "peer_port": "26069", "path": "*", "local_port_num": 26068, "peer_port_num": 26069}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26728", "peer_address": "*", "peer_port": "26727", "path": "*", "local_port_num": 26728, "peer_port_num": 26727}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "26668", "peer_address": "*", "peer_port": "26667", "path": "/run/systemd/journal/stdout", "local_port_num": 26668, "peer_port_num": 26667}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "21775", "peer_address": "*", "peer_port": "21558", "path": "/run/systemd/journal/stdout", "local_port_num": 21775, "peer_port_num": 21558}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "27364", "peer_address": "*", "peer_port": "29812", "path": "*", "local_port_num": 27364, "peer_port_num": 29812}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 768, "local_port": "25486", "peer_address": "*", "peer_port": "25485", "path": "*", "local_port_num": 25486, "peer_port_num": 25485}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "26727", "peer_address": "*", "peer_port": "26728", "path": "*", "local_port_num": 26727, "peer_port_num": 26728}, {"netid": "u_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_port": "29811", "peer_address": "*", "peer_port": "27361", "path": "/var/run/dbus/system_bus_socket", "local_port_num": 29811, "peer_port_num": 27361}, {"netid": "u_dgr", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_port": "22602", "peer_address": "*", "peer_port": "22601", "path": "*", "local_port_num": 22602, "peer_port_num": 22601}, {"netid": "icmp6", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "*", "local_port": "ipv6-icmp", "peer_address": "*", "peer_port": "*", "interface": "ens33"}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "127.0.0.53", "local_port": "domain", "peer_address": "0.0.0.0", "peer_port": "*", "interface": "lo"}, {"netid": "udp", "state": "UNCONN", "recv_q": 0, "send_q": 0, "local_address": "192.168.71.131", "local_port": "bootpc", "peer_address": "0.0.0.0", "peer_port": "*", "interface": "ens33"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "127.0.0.53", "local_port": "domain", "peer_address": "0.0.0.0", "peer_port": "*", "interface": "lo"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "0.0.0.0", "local_port": "ssh", "peer_address": "0.0.0.0", "peer_port": "*"}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "127.0.0.1", "local_port": "35485", "peer_address": "0.0.0.0", "peer_port": "*", "local_port_num": 35485}, {"netid": "tcp", "state": "LISTEN", "recv_q": 0, "send_q": 128, "local_address": "[::]", "local_port": "ssh", "peer_address": "[::]", "peer_port": "*"}, {"netid": "v_str", "state": "ESTAB", "recv_q": 0, "send_q": 0, "local_address": "999900439", "local_port": "1023", "peer_address": "0", "peer_port": "976", "local_port_num": 1023, "peer_port_num": 976}] diff --git a/tests/test_airport.py b/tests/test_airport.py index 91907515..67a0c16f 100644 --- a/tests/test_airport.py +++ b/tests/test_airport.py @@ -17,6 +17,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/airport-I.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_airport_I_json = json.loads(f.read()) + def test_airport_I_nodata(self): + """ + Test 'airport -I' with no data + """ + self.assertEqual(jc.parsers.airport.parse('', quiet=True), {}) + def test_airport_I_osx_10_14_6(self): """ Test 'airport -I' on OSX 10.14.6 diff --git a/tests/test_airport_s.py b/tests/test_airport_s.py index 2b964f01..fa228d5c 100644 --- a/tests/test_airport_s.py +++ b/tests/test_airport_s.py @@ -17,6 +17,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/airport-s.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_airport_s_json = json.loads(f.read()) + def test_airport_s_nodata(self): + """ + Test 'airport -s' with no data + """ + self.assertEqual(jc.parsers.airport_s.parse('', quiet=True), []) + def test_airport_s_osx_10_14_6(self): """ Test 'airport -s' on OSX 10.14.6 diff --git a/tests/test_arp.py b/tests/test_arp.py index 1db88555..0d0e6850 100644 --- a/tests/test_arp.py +++ b/tests/test_arp.py @@ -71,6 +71,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/arp-a.json'), 'r', encoding='utf-8') as f: self.freebsd12_arp_a_json = json.loads(f.read()) + def test_arp_nodata(self): + """ + Test 'arp' with no data + """ + self.assertEqual(jc.parsers.arp.parse('', quiet=True), []) + def test_arp_centos_7_7(self): """ Test 'arp' on Centos 7.7 diff --git a/tests/test_blkid.py b/tests/test_blkid.py index 5ea1f439..d76d3a67 100644 --- a/tests/test_blkid.py +++ b/tests/test_blkid.py @@ -71,6 +71,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/blkid-ip-udev-multi.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_blkid_ip_udev_multi_json = json.loads(f.read()) + def test_blkid_nodata(self): + """ + Test 'blkid' with no data + """ + self.assertEqual(jc.parsers.blkid.parse('', quiet=True), []) + def test_blkid_centos_7_7(self): """ Test 'blkid' on Centos 7.7 diff --git a/tests/test_crontab.py b/tests/test_crontab.py index 176f1de2..f40650d2 100644 --- a/tests/test_crontab.py +++ b/tests/test_crontab.py @@ -17,6 +17,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/crontab.json'), 'r', encoding='utf-8') as f: self.centos_7_7_crontab_json = json.loads(f.read()) + def test_crontab_nodata(self): + """ + Test 'crontab' with no data + """ + self.assertEqual(jc.parsers.crontab.parse('', quiet=True), {}) + def test_crontab_centos_7_7(self): """ Test 'crontab' on Centos 7.7 diff --git a/tests/test_crontab_u.py b/tests/test_crontab_u.py index 5e5f83b7..ca36e7bc 100644 --- a/tests/test_crontab_u.py +++ b/tests/test_crontab_u.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/crontab-u.json'), 'r', encoding='utf-8') as f: self.centos_7_7_crontab_u_json = json.loads(f.read()) + def test_crontab_u_nodata(self): + """ + Test 'crontab' with no data (has a user field) + """ + self.assertEqual(jc.parsers.crontab_u.parse('', quiet=True), {}) + def test_crontab_u_ubuntu_18_4(self): """ Test 'crontab' on Ubuntu 18.4 (has a user field) diff --git a/tests/test_csv.py b/tests/test_csv.py index 94fe7ac1..6d3b2d91 100644 --- a/tests/test_csv.py +++ b/tests/test_csv.py @@ -65,6 +65,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/csv-insurance.json'), 'r', encoding='utf-8') as f: self.generic_csv_insurance_json = json.loads(f.read()) + def test_csv_nodata(self): + """ + Test with no data + """ + self.assertEqual(jc.parsers.csv.parse('', quiet=True), []) + def test_csv_biostats(self): """ Test 'biostats.csv' file diff --git a/tests/test_df.py b/tests/test_df.py index 47f928c1..d59ef778 100644 --- a/tests/test_df.py +++ b/tests/test_df.py @@ -59,6 +59,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/df-h.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_df_h_json = json.loads(f.read()) + def test_df_nodata(self): + """ + Test plain 'df' with no data + """ + self.assertEqual(jc.parsers.df.parse('', quiet=True), []) + def test_df_centos_7_7(self): """ Test plain 'df' on Centos 7.7 diff --git a/tests/test_dig.py b/tests/test_dig.py index 6e7ad431..c124dd51 100644 --- a/tests/test_dig.py +++ b/tests/test_dig.py @@ -101,6 +101,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/dig-axfr.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_dig_axfr_json = json.loads(f.read()) + def test_dig_nodata(self): + """ + Test 'dig' with no data + """ + self.assertEqual(jc.parsers.dig.parse('', quiet=True), []) + def test_dig_centos_7_7(self): """ Test 'dig' on Centos 7.7 diff --git a/tests/test_dmidecode.py b/tests/test_dmidecode.py index 77bf56fc..3d5476e6 100644 --- a/tests/test_dmidecode.py +++ b/tests/test_dmidecode.py @@ -29,6 +29,11 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/dmidecode.json'), 'r', encoding='utf-8') as f: self.fedora32_dmidecode_json = json.loads(f.read()) + def test_dmidecode_nodata(self): + """ + Test 'dmidecode' with no data + """ + self.assertEqual(jc.parsers.dmidecode.parse('', quiet=True), []) def test_dmidecode_centos_7_7(self): """ diff --git a/tests/test_du.py b/tests/test_du.py index 907c3f55..b10b21e0 100644 --- a/tests/test_du.py +++ b/tests/test_du.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/du.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_du_json = json.loads(f.read()) + def test_du_nodata(self): + """ + Test 'du' with no data + """ + self.assertEqual(jc.parsers.du.parse('', quiet=True), []) + def test_du_centos_7_7(self): """ Test 'du' on Centos 7.7 diff --git a/tests/test_env.py b/tests/test_env.py index 920d6e01..558ee6e3 100644 --- a/tests/test_env.py +++ b/tests/test_env.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/env.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_env_json = json.loads(f.read()) + def test_env_nodata(self): + """ + Test 'env' with no data + """ + self.assertEqual(jc.parsers.env.parse('', quiet=True), []) + def test_env_centos_7_7(self): """ Test 'env' on Centos 7.7 diff --git a/tests/test_file.py b/tests/test_file.py index ac80ea79..a8df77cf 100644 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/file2.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_file2_json = json.loads(f.read()) + def test_file_nodata(self): + """ + Test 'file' with no data + """ + self.assertEqual(jc.parsers.file.parse('', quiet=True), []) + def test_file_centos_7_7(self): """ Test 'file *' on Centos 7.7 diff --git a/tests/test_free.py b/tests/test_free.py index 70b33cfd..40a031e4 100644 --- a/tests/test_free.py +++ b/tests/test_free.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/free-h.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_free_h_json = json.loads(f.read()) + def test_free_nodata(self): + """ + Test 'free' with no data + """ + self.assertEqual(jc.parsers.free.parse('', quiet=True), []) + def test_free_centos_7_7(self): """ Test 'free' on Centos 7.7 diff --git a/tests/test_fstab.py b/tests/test_fstab.py index 3cbfc0f7..1e04ee2f 100644 --- a/tests/test_fstab.py +++ b/tests/test_fstab.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/fstab.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_fstab_json = json.loads(f.read()) + def test_fstab_nodata(self): + """ + Test 'cat /etc/fstab' with no data + """ + self.assertEqual(jc.parsers.fstab.parse('', quiet=True), []) + def test_fstab_centos_7_7(self): """ Test 'cat /etc/fstab' on Centos 7.7 diff --git a/tests/test_group.py b/tests/test_group.py index b6f4755d..cf192e4f 100644 --- a/tests/test_group.py +++ b/tests/test_group.py @@ -29,6 +29,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/group.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_group_json = json.loads(f.read()) + def test_group_nodata(self): + """ + Test 'cat /etc/group' with no data + """ + self.assertEqual(jc.parsers.group.parse('', quiet=True), []) + def test_group_centos_7_7(self): """ Test 'cat /etc/group' on Centos 7.7 diff --git a/tests/test_gshadow.py b/tests/test_gshadow.py index 67ee525e..2a3eb7e5 100644 --- a/tests/test_gshadow.py +++ b/tests/test_gshadow.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/gshadow.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_gshadow_json = json.loads(f.read()) + def test_gshadow_nodata(self): + """ + Test 'cat /etc/gshadow' with no data + """ + self.assertEqual(jc.parsers.gshadow.parse('', quiet=True), []) + def test_gshadow_centos_7_7(self): """ Test 'cat /etc/gshadow' on Centos 7.7 diff --git a/tests/test_history.py b/tests/test_history.py index d71259e5..b7cdaa8c 100644 --- a/tests/test_history.py +++ b/tests/test_history.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/history.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_history_json = json.loads(f.read()) + def test_history_nodata(self): + """ + Test 'history' with no data + """ + self.assertEqual(jc.parsers.history.parse('', quiet=True), []) + def test_history_centos_7_7(self): """ Test 'history' on Centos 7.7 diff --git a/tests/test_hosts.py b/tests/test_hosts.py index bdc071ce..2a5205bb 100644 --- a/tests/test_hosts.py +++ b/tests/test_hosts.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/hosts.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_hosts_json = json.loads(f.read()) + def test_hosts_nodata(self): + """ + Test 'cat /etc/hosts' with no data + """ + self.assertEqual(jc.parsers.hosts.parse('', quiet=True), []) + def test_hosts_centos_7_7(self): """ Test 'cat /etc/hosts' on Centos 7.7 diff --git a/tests/test_id.py b/tests/test_id.py index 0f826686..d139b3bf 100644 --- a/tests/test_id.py +++ b/tests/test_id.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/id.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_id_json = json.loads(f.read()) + def test_id_nodata(self): + """ + Test 'id' with no data + """ + self.assertEqual(jc.parsers.id.parse('', quiet=True), {}) + def test_id_centos_7_7(self): """ Test 'id' on Centos 7.7 diff --git a/tests/test_ifconfig.py b/tests/test_ifconfig.py index 41b1bf60..8038d29d 100644 --- a/tests/test_ifconfig.py +++ b/tests/test_ifconfig.py @@ -47,6 +47,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ifconfig2.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_ifconfig2_json = json.loads(f.read()) + def test_ifconfig_nodata(self): + """ + Test 'ifconfig' with no data + """ + self.assertEqual(jc.parsers.ifconfig.parse('', quiet=True), []) + def test_ifconfig_centos_7_7(self): """ Test 'ifconfig' on Centos 7.7 diff --git a/tests/test_ini.py b/tests/test_ini.py index 1a07e32e..977886e1 100644 --- a/tests/test_ini.py +++ b/tests/test_ini.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/ini-iptelserver.json'), 'r', encoding='utf-8') as f: self.generic_ini_iptelserver_json = json.loads(f.read()) + def test_ini_nodata(self): + """ + Test the test ini file with no data + """ + self.assertEqual(jc.parsers.ini.parse('', quiet=True), {}) + def test_ini_test(self): """ Test the test ini file diff --git a/tests/test_iptables.py b/tests/test_iptables.py index 2a325f82..148a5d73 100644 --- a/tests/test_iptables.py +++ b/tests/test_iptables.py @@ -83,6 +83,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/iptables-raw.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_iptables_raw_json = json.loads(f.read()) + def test_iptables_nodata(self): + """ + Test 'sudo iptables' with no data + """ + self.assertEqual(jc.parsers.iptables.parse('', quiet=True), []) + def test_iptables_filter_centos_7_7(self): """ Test 'sudo iptables -L -t filter' on Centos 7.7 diff --git a/tests/test_jobs.py b/tests/test_jobs.py index 24f99e1f..c359b8d3 100644 --- a/tests/test_jobs.py +++ b/tests/test_jobs.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/jobs.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_jobs_json = json.loads(f.read()) + def test_jobs_nodata(self): + """ + Test 'jobs' with no data + """ + self.assertEqual(jc.parsers.jobs.parse('', quiet=True), []) + def test_jobs_centos_7_7(self): """ Test 'jobs' on Centos 7.7 diff --git a/tests/test_last.py b/tests/test_last.py index 7f146786..048d9b06 100644 --- a/tests/test_last.py +++ b/tests/test_last.py @@ -65,6 +65,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/last.json'), 'r', encoding='utf-8') as f: self.freebsd12_last_json = json.loads(f.read()) + def test_last_nodata(self): + """ + Test plain 'last' with no data + """ + self.assertEqual(jc.parsers.last.parse('', quiet=True), []) + def test_last_centos_7_7(self): """ Test plain 'last' on Centos 7.7 diff --git a/tests/test_lsblk.py b/tests/test_lsblk.py index 0ec2c1d7..606ce638 100644 --- a/tests/test_lsblk.py +++ b/tests/test_lsblk.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/lsblk-allcols.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_lsblk_allcols_json = json.loads(f.read()) + def test_lsblk_nodata(self): + """ + Test 'lsblk' with no data + """ + self.assertEqual(jc.parsers.lsblk.parse('', quiet=True), []) + def test_lsblk_centos_7_7(self): """ Test 'lsblk' on Centos 7.7 diff --git a/tests/test_lsmod.py b/tests/test_lsmod.py index 2ac482d5..5cd9b768 100644 --- a/tests/test_lsmod.py +++ b/tests/test_lsmod.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/lsmod.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_lsmod_json = json.loads(f.read()) + def test_lsmod_nodata(self): + """ + Test 'lsmod' with no data + """ + self.assertEqual(jc.parsers.lsmod.parse('', quiet=True), []) + def test_lsmod_centos_7_7(self): """ Test 'lsmod' on Centos 7.7 diff --git a/tests/test_lsof.py b/tests/test_lsof.py index 2c8dcaf6..94311a80 100644 --- a/tests/test_lsof.py +++ b/tests/test_lsof.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/lsof-sudo.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_lsof_sudo_json = json.loads(f.read()) + def test_lsof_nodata(self): + """ + Test 'lsof' with no data + """ + self.assertEqual(jc.parsers.lsof.parse('', quiet=True), []) + def test_lsof_centos_7_7(self): """ Test 'lsof' on Centos 7.7 diff --git a/tests/test_mount.py b/tests/test_mount.py index 3c8467a1..6e9dad64 100644 --- a/tests/test_mount.py +++ b/tests/test_mount.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/mount2.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_mount2_json = json.loads(f.read()) + def test_mount_nodata(self): + """ + Test 'mount' with no data + """ + self.assertEqual(jc.parsers.mount.parse('', quiet=True), []) + def test_mount_centos_7_7(self): """ Test 'mount' on Centos 7.7 diff --git a/tests/test_netstat.py b/tests/test_netstat.py index f4c2be31..8e6da0b1 100644 --- a/tests/test_netstat.py +++ b/tests/test_netstat.py @@ -227,6 +227,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/netstat-ib.json'), 'r', encoding='utf-8') as f: self.freebsd12_netstat_ib_json = json.loads(f.read()) + def test_netstat_nodata(self): + """ + Test 'netstat' with no data + """ + self.assertEqual(jc.parsers.netstat.parse('', quiet=True), []) + def test_netstat_centos_7_7(self): """ Test 'netstat' on Centos 7.7 diff --git a/tests/test_ntpq.py b/tests/test_ntpq.py index 83bee023..23e40a9c 100644 --- a/tests/test_ntpq.py +++ b/tests/test_ntpq.py @@ -47,6 +47,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ntpq-p.json'), 'r', encoding='utf-8') as f: self.freebsd12_ntpq_p_json = json.loads(f.read()) + def test_ntpq_p_nodata(self): + """ + Test 'ntpq -p' with no data + """ + self.assertEqual(jc.parsers.ntpq.parse('', quiet=True), []) + def test_ntpq_p_centos_7_7(self): """ Test 'ntpq -p' on Centos 7.7 diff --git a/tests/test_passwd.py b/tests/test_passwd.py index d829bb29..51cea4f9 100644 --- a/tests/test_passwd.py +++ b/tests/test_passwd.py @@ -29,6 +29,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/passwd.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_passwd_json = json.loads(f.read()) + def test_passwd_nodata(self): + """ + Test 'cat /etc/passwd' with no data + """ + self.assertEqual(jc.parsers.passwd.parse('', quiet=True), []) + def test_passwd_centos_7_7(self): """ Test 'cat /etc/passwd' on Centos 7.7 diff --git a/tests/test_pip_list.py b/tests/test_pip_list.py index 3981ff5b..f38ba9d3 100644 --- a/tests/test_pip_list.py +++ b/tests/test_pip_list.py @@ -41,6 +41,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/pip-list.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_pip_list_json = json.loads(f.read()) + def test_pip_list_nodata(self): + """ + Test 'pip_list' with no data + """ + self.assertEqual(jc.parsers.pip_list.parse('', quiet=True), []) + def test_pip_list_centos_7_7(self): """ Test 'pip_list' on Centos 7.7 diff --git a/tests/test_pip_show.py b/tests/test_pip_show.py index 9e6af845..11872ffc 100644 --- a/tests/test_pip_show.py +++ b/tests/test_pip_show.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/pip-show.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_pip_show_json = json.loads(f.read()) + def test_pip_show_nodata(self): + """ + Test 'pip show' with no data + """ + self.assertEqual(jc.parsers.pip_show.parse('', quiet=True), []) + def test_pip_show_centos_7_7(self): """ Test 'pip show' on Centos 7.7 diff --git a/tests/test_ps.py b/tests/test_ps.py index 3de61b61..d573a4ae 100644 --- a/tests/test_ps.py +++ b/tests/test_ps.py @@ -59,6 +59,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ps-axu.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_ps_axu_json = json.loads(f.read()) + def test_ps_nodata(self): + """ + Test 'ps' with no data + """ + self.assertEqual(jc.parsers.ps.parse('', quiet=True), []) + def test_ps_ef_centos_7_7(self): """ Test 'ps -ef' on Centos 7.7 diff --git a/tests/test_route.py b/tests/test_route.py index 2ad87a49..711e528a 100644 --- a/tests/test_route.py +++ b/tests/test_route.py @@ -41,6 +41,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/nixos/route-ee.json'), 'r', encoding='utf-8') as f: self.nixos_route_ee_json = json.loads(f.read()) + def test_route_nodata(self): + """ + Test 'route' with no data + """ + self.assertEqual(jc.parsers.route.parse('', quiet=True), []) + def test_route_centos_7_7(self): """ Test 'route' on Centos 7.7 diff --git a/tests/test_shadow.py b/tests/test_shadow.py index 06fbf703..d00742d7 100644 --- a/tests/test_shadow.py +++ b/tests/test_shadow.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/shadow.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_shadow_json = json.loads(f.read()) + def test_shadow_nodata(self): + """ + Test 'cat /etc/shadow' with no data + """ + self.assertEqual(jc.parsers.shadow.parse('', quiet=True), []) + def test_shadow_centos_7_7(self): """ Test 'cat /etc/shadow' on Centos 7.7 diff --git a/tests/test_ss.py b/tests/test_ss.py index 80dea84a..4f0c5449 100644 --- a/tests/test_ss.py +++ b/tests/test_ss.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ss-sudo-a.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_ss_sudo_a_json = json.loads(f.read()) + def test_ss_nodata(self): + """ + Test 'ss' with no data + """ + self.assertEqual(jc.parsers.ss.parse('', quiet=True), []) + def test_ss_sudo_a_centos_7_7(self): """ Test 'sudo ss -a' on Centos 7.7 diff --git a/tests/test_stat.py b/tests/test_stat.py index a9eb8bc7..212f9eec 100644 --- a/tests/test_stat.py +++ b/tests/test_stat.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/stat.json'), 'r', encoding='utf-8') as f: self.freebsd12_stat_json = json.loads(f.read()) + def test_stat_nodata(self): + """ + Test 'stat' with no data + """ + self.assertEqual(jc.parsers.stat.parse('', quiet=True), []) + def test_stat_centos_7_7(self): """ Test 'stat /bin/*' on Centos 7.7 diff --git a/tests/test_systemctl.py b/tests/test_systemctl.py index 1da9bad8..70516c4f 100644 --- a/tests/test_systemctl.py +++ b/tests/test_systemctl.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/systemctl.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_systemctl_json = json.loads(f.read()) + def test_systemctl_nodata(self): + """ + Test 'systemctl' with no data + """ + self.assertEqual(jc.parsers.systemctl.parse('', quiet=True), []) + def test_systemctl_centos_7_7(self): """ Test 'systemctl -a' on Centos 7.7 diff --git a/tests/test_systemctl_lj.py b/tests/test_systemctl_lj.py index bdc108b0..4c82f6cc 100644 --- a/tests/test_systemctl_lj.py +++ b/tests/test_systemctl_lj.py @@ -17,6 +17,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/systemctl-lj.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_systemctl_lj_json = json.loads(f.read()) + def test_systemctl_lj_nodata(self): + """ + Test 'systemctl -a list-jobs' with no data + """ + self.assertEqual(jc.parsers.systemctl_lj.parse('', quiet=True), []) + def test_systemctl_lj_ubuntu_18_4(self): """ Test 'systemctl -a list-jobs' on Ubuntu 18.4 diff --git a/tests/test_systemctl_ls.py b/tests/test_systemctl_ls.py index 69f14bd0..1f0c2bf6 100644 --- a/tests/test_systemctl_ls.py +++ b/tests/test_systemctl_ls.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/systemctl-ls.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_systemctl_ls_json = json.loads(f.read()) + def test_systemctl_ls_nodata(self): + """ + Test 'systemctl -a list-sockets' with no data + """ + self.assertEqual(jc.parsers.systemctl_ls.parse('', quiet=True), []) + def test_systemctl_ls_centos_7_7(self): """ Test 'systemctl -a list-sockets' on Centos 7.7 diff --git a/tests/test_systemctl_luf.py b/tests/test_systemctl_luf.py index f8c75e2c..b773fdcc 100644 --- a/tests/test_systemctl_luf.py +++ b/tests/test_systemctl_luf.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/systemctl-luf.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_systemctl_luf_json = json.loads(f.read()) + def test_systemctl_luf_nodata(self): + """ + Test 'systemctl -a list-sockets' with no data + """ + self.assertEqual(jc.parsers.systemctl_luf.parse('', quiet=True), []) + def test_systemctl_luf_centos_7_7(self): """ Test 'systemctl -a list-sockets' on Centos 7.7 diff --git a/tests/test_timedatectl.py b/tests/test_timedatectl.py index 52e086e2..1653b6ef 100644 --- a/tests/test_timedatectl.py +++ b/tests/test_timedatectl.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/timedatectl.json'), 'r', encoding='utf-8') as f: self.ubuntu_18_4_timedatectl_json = json.loads(f.read()) + def test_timedatectl_nodata(self): + """ + Test 'timedatectl' with no data + """ + self.assertEqual(jc.parsers.timedatectl.parse('', quiet=True), {}) + def test_timedatectl_centos_7_7(self): """ Test 'timedatectl' on Centos 7.7 diff --git a/tests/test_uname.py b/tests/test_uname.py index 57873aa5..ca2ca2de 100644 --- a/tests/test_uname.py +++ b/tests/test_uname.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/uname-a.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_uname_a_json = json.loads(f.read()) + def test_uname_nodata(self): + """ + Test 'uname -a' with no data + """ + self.assertEqual(jc.parsers.uname.parse('', quiet=True), {}) + def test_uname_centos_7_7(self): """ Test 'uname -a' on Centos 7.7 diff --git a/tests/test_uptime.py b/tests/test_uptime.py index f02eb44a..06a56c7e 100644 --- a/tests/test_uptime.py +++ b/tests/test_uptime.py @@ -35,6 +35,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/uptime.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_uptime_json = json.loads(f.read()) + def test_uptime_nodata(self): + """ + Test 'uptime' with no data + """ + self.assertEqual(jc.parsers.uptime.parse('', quiet=True), {}) + def test_uptime_centos_7_7(self): """ Test 'uptime' on Centos 7.7 diff --git a/tests/test_w.py b/tests/test_w.py index dd892908..f360b4f9 100644 --- a/tests/test_w.py +++ b/tests/test_w.py @@ -41,6 +41,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/nixos/w.json'), 'r', encoding='utf-8') as f: self.nixos_w_json = json.loads(f.read()) + def test_w_nodata(self): + """ + Test 'w' with no data + """ + self.assertEqual(jc.parsers.w.parse('', quiet=True), []) + def test_w_centos_7_7(self): """ Test 'w' on Centos 7.7 diff --git a/tests/test_who.py b/tests/test_who.py index e5d2488b..0366a98b 100644 --- a/tests/test_who.py +++ b/tests/test_who.py @@ -47,6 +47,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/who-a.json'), 'r', encoding='utf-8') as f: self.osx_10_14_6_who_a_json = json.loads(f.read()) + def test_who_nodata(self): + """ + Test 'who' with no data + """ + self.assertEqual(jc.parsers.who.parse('', quiet=True), []) + def test_who_centos_7_7(self): """ Test 'who' on Centos 7.7 diff --git a/tests/test_xml.py b/tests/test_xml.py index 3ea086ff..a4b65c51 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/xml-foodmenu.json'), 'r', encoding='utf-8') as f: self.generic_xml_foodmenu_json = json.loads(f.read()) + def test_xml_nodata(self): + """ + Test xml parser with no data + """ + self.assertEqual(jc.parsers.xml.parse('', quiet=True), []) + def test_xml_cd_catalog(self): """ Test the cd catalog xml file diff --git a/tests/test_yaml.py b/tests/test_yaml.py index 87f39f20..dcb0bd92 100644 --- a/tests/test_yaml.py +++ b/tests/test_yaml.py @@ -23,6 +23,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/yaml-istio-sidecar.json'), 'r', encoding='utf-8') as f: self.generic_yaml_istio_sidecar_json = json.loads(f.read()) + def test_yaml_nodata(self): + """ + Test the YAML parser with no data + """ + self.assertEqual(jc.parsers.yaml.parse('', quiet=True), []) + def test_yaml_istio_sc(self): """ Test the Istio SC yaml file