https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251541

            Bug ID: 251541
           Summary: libxo json output for `netstat -Lan` misses statistics
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: b...@freebsd.org
          Reporter: ya...@apple.com

# /usr/bin/netstat -Lan --libxo json | jq .
{
  "statistics": {
    "socket": [
      {
        "queue-length": 0,
        "incomplete-queue-length": 0,
        "queue-limit": 128,
        "path": "/tmp/ssh-NZBPhqvAB7/agent.66959"
      },
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {
        "queue-length": 0,
        "incomplete-queue-length": 0,
        "queue-limit": 65535,
        "path": "/var/run/some.sock"
      },
      {
        "queue-length": 0,
        "incomplete-queue-length": 0,
        "queue-limit": 255,
        "path": "/var/db/syslog-ng.ctl"
      },
      {
        "queue-length": 0,
        "incomplete-queue-length": 0,
        "queue-limit": 65535,
        "path": "/var/run/other.sock"
      },
      {},
      {},
      {
        "queue-length": 0,
        "incomplete-queue-length": 0,
        "queue-limit": 5,
        "path": "/var/run/lldpd.socket"
      },
      {},
      {},
      {
        "queue-length": 0,
        "incomplete-queue-length": 0,
        "queue-limit": 100,
        "path": "/var/run/mdnsd"
      },
      {
        "queue-length": 0,
        "incomplete-queue-length": 0,
        "queue-limit": 4,
        "path": "/var/run/devd.pipe"
      },
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {},
      {
        "queue-length": 0,
        "incomplete-queue-length": 0,
        "queue-limit": 4,
        "path": "/var/run/devd.seqpacket.pipe"
      }
    ]
  }
}

Compared to: 

# /usr/bin/netstat -Lan
Current listen queue sizes (qlen/incqlen/maxqlen)
Proto Listen                           Local Address
tcp4  0/0/65535                        127.0.0.1.9465
tcp4  0/0/65535                        *.443
tcp6  0/0/65535                        *.443
tcp4  0/0/5                            127.0.0.1.8083
tcp4  0/0/5                            127.0.0.1.5199
tcp46 0/0/65535                        *.8888
tcp6  0/0/256                          ::1.8954
tcp4  0/0/256                          127.0.0.1.8954
tcp6  0/0/256                          1000:a9:a6:300.80
tcp6  0/0/256                          ::1.53
tcp4  0/0/256                          192.212.30.87.80
tcp4  0/0/256                          127.0.0.1.80
tcp4  0/0/65535                        127.0.0.1.9100
tcp4  0/0/65535                        127.0.0.1.9970
tcp4  0/0/65535                        127.0.0.1.9123
tcp4  0/0/65535                        127.0.0.1.9289
tcp4  0/0/65535                        127.0.0.1.9119
tcp46 0/0/65535                        *.9324
tcp46 0/0/65535                        *.8000
tcp4  0/0/65535                        127.0.0.1.4444
tcp4  0/0/128                          *.22
tcp6  0/0/128                          *.22
Some tcp sockets may have been created.
unix  0/0/128                          /tmp/ssh-NZBPhqvAB7/agent.66959
unix  0/0/65535                        /var/run/some.sock
unix  0/0/255                          /var/db/syslog-ng.ctl
unix  0/0/65535                        /var/run/other.sock
unix  0/0/5                            /var/run/lldpd.socket
unix  0/0/100                          /var/run/mdnsd
unix  0/0/4                            /var/run/devd.pipe
unix  0/0/4                            /var/run/devd.seqpacket.pipe


It seems like the empty dictionaries tend to show up most of the time anyway,
but in this particular output the interesting statistics are completely
missing.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to