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

wip: Supraseal healthpage output #325

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

magik6k
Copy link
Collaborator

@magik6k magik6k commented Nov 10, 2024

This PR makes curio output logs like

2024-11-10T19:37:18.734Z	INFO	batchseal	sealsupra/task_supraseal.go:128	nvme health page	{"hp": [{"CriticalWarning":0,"Temperature":32,"TemperatureSensors..

Eventually that should go to e.g. /metrics/pprof, but for now logs are better than nothing at all

Full example output:

{
  "hp": [
    {
      "CriticalWarning": 0,
      "Temperature": 31, // pretty sure this is C
      "TemperatureSensors": [
        31,
        43,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 7351772500, // 512B blocks? (maybe 4k? idk, maybe it depends, tho probably just 512B)
      "DataUnitsWritten": 194806471,
      "HostReadCommands": 918971519654, // cumulative iops
      "HostWriteCommands": 24350808844,
      "ControllerBusyTime": 1198800000000000,
      "PowerCycles": 10,
      "PowerOnHours": 25329600000000000,
      "UnsafeShutdowns": 6,
      "MediaErrors": 0,
      "ErrorLogEntries": 2
    },
    {
      "CriticalWarning": 0,
      "Temperature": 31,
      "TemperatureSensors": [
        31,
        40,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 7000076004,
      "DataUnitsWritten": 185866591,
      "HostReadCommands": 875009457677,
      "HostWriteCommands": 23233323845,
      "ControllerBusyTime": 1096440000000000,
      "PowerCycles": 9,
      "PowerOnHours": 25329600000000000,
      "UnsafeShutdowns": 4,
      "MediaErrors": 0,
      "ErrorLogEntries": 0
    },
    {
      "CriticalWarning": 0,
      "Temperature": 31,
      "TemperatureSensors": [
        31,
        40,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 6999993907,
      "DataUnitsWritten": 185866662,
      "HostReadCommands": 874999195551,
      "HostWriteCommands": 23233332667,
      "ControllerBusyTime": 1095000000000000,
      "PowerCycles": 10,
      "PowerOnHours": 25329600000000000,
      "UnsafeShutdowns": 5,
      "MediaErrors": 0,
      "ErrorLogEntries": 0
    },
    {
      "CriticalWarning": 0,
      "Temperature": 32,
      "TemperatureSensors": [
        32,
        43,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 7850355961,
      "DataUnitsWritten": 207678358,
      "HostReadCommands": 981294440416,
      "HostWriteCommands": 25959794741,
      "ControllerBusyTime": 1219860000000000,
      "PowerCycles": 19,
      "PowerOnHours": 25398000000000000,
      "UnsafeShutdowns": 14,
      "MediaErrors": 0,
      "ErrorLogEntries": 1
    },
    {
      "CriticalWarning": 0,
      "Temperature": 31,
      "TemperatureSensors": [
        31,
        41,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 7850253556,
      "DataUnitsWritten": 207678078,
      "HostReadCommands": 981281639756,
      "HostWriteCommands": 25959759728,
      "ControllerBusyTime": 1220940000000000,
      "PowerCycles": 18,
      "PowerOnHours": 25398000000000000,
      "UnsafeShutdowns": 13,
      "MediaErrors": 0,
      "ErrorLogEntries": 0
    },
    {
      "CriticalWarning": 0,
      "Temperature": 31,
      "TemperatureSensors": [
        31,
        41,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 7850331280,
      "DataUnitsWritten": 207678096,
      "HostReadCommands": 981291356925,
      "HostWriteCommands": 25959761922,
      "ControllerBusyTime": 1220580000000000,
      "PowerCycles": 18,
      "PowerOnHours": 25398000000000000,
      "UnsafeShutdowns": 13,
      "MediaErrors": 0,
      "ErrorLogEntries": 0
    },
    {
      "CriticalWarning": 0,
      "Temperature": 31,
      "TemperatureSensors": [
        31,
        41,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 7850250971,
      "DataUnitsWritten": 207678127,
      "HostReadCommands": 981281304787,
      "HostWriteCommands": 25959765851,
      "ControllerBusyTime": 1220580000000000,
      "PowerCycles": 18,
      "PowerOnHours": 25398000000000000,
      "UnsafeShutdowns": 13,
      "MediaErrors": 0,
      "ErrorLogEntries": 0
    },
    {
      "CriticalWarning": 0,
      "Temperature": 32,
      "TemperatureSensors": [
        32,
        41,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 7850350058,
      "DataUnitsWritten": 207678226,
      "HostReadCommands": 981293708152,
      "HostWriteCommands": 25959778161,
      "ControllerBusyTime": 1220640000000000,
      "PowerCycles": 18,
      "PowerOnHours": 25398000000000000,
      "UnsafeShutdowns": 13,
      "MediaErrors": 0,
      "ErrorLogEntries": 1
    },
    {
      "CriticalWarning": 0,
      "Temperature": 31,
      "TemperatureSensors": [
        31,
        41,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 7850251672,
      "DataUnitsWritten": 207677851,
      "HostReadCommands": 981281406204,
      "HostWriteCommands": 25959731256,
      "ControllerBusyTime": 1221240000000000,
      "PowerCycles": 18,
      "PowerOnHours": 25398000000000000,
      "UnsafeShutdowns": 13,
      "MediaErrors": 0,
      "ErrorLogEntries": 0
    },
    {
      "CriticalWarning": 0,
      "Temperature": 31,
      "TemperatureSensors": [
        31,
        40,
        -273,
        -273,
        -273,
        -273,
        -273,
        -273
      ],
      "WarningTempTime": 0,
      "CriticalTempTime": 0,
      "AvailableSpare": 100,
      "AvailableSpareThreshold": 10,
      "PercentageUsed": 0,
      "DataUnitsRead": 7849566782,
      "DataUnitsWritten": 207090606,
      "HostReadCommands": 981195798647,
      "HostWriteCommands": 25886325749,
      "ControllerBusyTime": 1221000000000000,
      "PowerCycles": 18,
      "PowerOnHours": 25398000000000000,
      "UnsafeShutdowns": 13,
      "MediaErrors": 0,
      "ErrorLogEntries": 0
    }
  ]
}

@magik6k magik6k changed the title Feat/supra healthpage wip: Supraseal healthpage output Nov 10, 2024
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

Successfully merging this pull request may close these issues.

1 participant