ipfs/kubo

enhance 'ipfs diag sys' output

Open

#7458 aperta il 10 giu 2020

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Go (2725 fork)batch import
P3exp/novicehelp wantedkind/enhancementstatus/acceptedstatus/ready

Metriche repository

Star
 (13.906 star)
Metriche merge PR
 (Merge medio 4g 2h) (28 PR mergiate in 30 g)

Descrizione

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

Guida contributor