Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for smartctl --scan --json output for non-standard systems #221

Open
NiceGuyIT opened this issue Apr 2, 2024 · 2 comments
Open

Comments

@NiceGuyIT
Copy link
Member

PR #188 added lots of test files containing smartctl output. To test PRs such as #205, it would be nice to have the output of smartctl --scan --json. Either add them as a comment below (use spoilers) or submit them in a PR. This data should not have any sensitive data so there's no need to redact anything.

@6r4yf0x
Copy link

6r4yf0x commented Apr 10, 2024

1
{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      1
    ],
    "svn_revision": "5022",
    "platform_info": "x86_64-linux-5.4.0-124-generic",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--json",
      "--scan"
    ],
    "exit_status": 0
  },
  "devices": [
    {
      "name": "/dev/sda",
      "info_name": "/dev/sda",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_01]",
      "type": "megaraid,1",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_02]",
      "type": "megaraid,2",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_03]",
      "type": "megaraid,3",
      "protocol": "SCSI"
    }
  ]
}
2
{
"json_format_version": [
  1,
  0
],
"smartctl": {
  "version": [
    7,
    1
  ],
  "svn_revision": "5022",
  "platform_info": "x86_64-linux-5.4.0-156-generic",
  "build_info": "(local build)",
  "argv": [
    "smartctl",
    "--json",
    "--scan"
  ],
  "exit_status": 0
},
"devices": [
  {
    "name": "/dev/sda",
    "info_name": "/dev/sda",
    "type": "scsi",
    "protocol": "SCSI"
  },
  {
    "name": "/dev/sdb",
    "info_name": "/dev/sdb",
    "type": "scsi",
    "protocol": "SCSI"
  },
  {
    "name": "/dev/sdc",
    "info_name": "/dev/sdc",
    "type": "scsi",
    "protocol": "SCSI"
  },
  {
    "name": "/dev/bus/0",
    "info_name": "/dev/bus/0 [megaraid_disk_04]",
    "type": "megaraid,4",
    "protocol": "SCSI"
  },
  {
    "name": "/dev/bus/0",
    "info_name": "/dev/bus/0 [megaraid_disk_05]",
    "type": "megaraid,5",
    "protocol": "SCSI"
  },
  {
    "name": "/dev/bus/0",
    "info_name": "/dev/bus/0 [megaraid_disk_06]",
    "type": "megaraid,6",
    "protocol": "SCSI"
  },
  {
    "name": "/dev/bus/0",
    "info_name": "/dev/bus/0 [megaraid_disk_07]",
    "type": "megaraid,7",
    "protocol": "SCSI"
  }
]
}
3
{
"json_format_version": [
  1,
  0
],
"smartctl": {
  "version": [
    7,
    1
  ],
  "svn_revision": "5022",
  "platform_info": "x86_64-linux-5.4.0-122-generic",
  "build_info": "(local build)",
  "argv": [
    "smartctl",
    "--json",
    "--scan"
  ],
  "exit_status": 0
},
"devices": [
  {
    "name": "/dev/sda",
    "info_name": "/dev/sda",
    "type": "scsi",
    "protocol": "SCSI"
  },
  {
    "name": "/dev/bus/0",
    "info_name": "/dev/bus/0 [megaraid_disk_17]",
    "type": "megaraid,17",
    "protocol": "SCSI"
  },
  {
    "name": "/dev/bus/0",
    "info_name": "/dev/bus/0 [megaraid_disk_18]",
    "type": "megaraid,18",
    "protocol": "SCSI"
  }
]
}

@karl-rousseau
Copy link

With the same idea, for SAS/SCSI drives, it would be nice to have those specific controller values taken into account when there are exported into JSON format using such command line:

smartctl -a -d cciss,0 /dev/sda --json=u

And there is an important HDD health metric to monitor:

"smartctl_0043_u": "Non-medium error count: 626",

When the disk is brand new, this value is equal to zero and with time, it will increase. It is very similar to the SATA one named "Reallocated sector count".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants