ipfs/kubo

enhance 'ipfs diag sys' output

Open

#7.458 geöffnet am 10. Juni 2020

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (2.725 Forks)batch import
P3exp/novicehelp wantedkind/enhancementstatus/acceptedstatus/ready

Repository-Metriken

Stars
 (13.906 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 2h) (28 gemergte PRs in 30 T)

Beschreibung

We like to extend the ipfs diag sys output to include more system information than just the platform, architecture, and the go version.

Currently, a typical output looks like this:

{
  "diskinfo": {
    "free_space": 18522890240,
    "fstype": "2435016766",
    "total_space": 14918279168
  },
  "environment": {
    "GOPATH": "",
    "IPFS_PATH": ""
  },
  "ipfs_commit": "",
  "ipfs_version": "0.6.0-dev",
  "memory": {
    "swap": 15964000,
    "virt": 5207176000
  },
  "net": {
    "interface_addresses": [
      "/ip4/127.0.0.1",
      "/ip4/192.168.8.2",
      "/ip6/::1",
      "/ip6/fe80::8c71:2b0e:6947:3090"
    ],
    "online": true
  },
  "runtime": {
    "arch": "amd64",
    "compiler": "gc",
    "gomaxprocs": 4,
    "numcpu": 4,
    "numgoroutines": 1864,
    "os": "linux",
    "version": "go1.14.4"
  }
}

@Stebalien likes to remove the interface_addresses from the output.

I like to add some more information, like those commands provide:

Linux:
uname -a; grep -Hv "^#" /etc/*release
BSD:
uname -a; uname -K
MacOS:
uname -a; sw_vers

This idea was discussed earlier in the PR https://github.com/ipfs/go-ipfs/pull/7408

Contributor Guide