ipfs/kubo

enhance 'ipfs diag sys' output

Open

#7,458 创建于 2020年6月10日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Go (2,725 fork)batch import
P3exp/novicehelp wantedkind/enhancementstatus/acceptedstatus/ready

仓库指标

Star
 (13,906 star)
PR 合并指标
 (平均合并 4天 2小时) (30 天内合并 28 个 PR)

描述

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

贡献者指南