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

Is there a metric which corresponds to the power mode? #195

Open
AeroNotix opened this issue Jan 17, 2024 · 5 comments
Open

Is there a metric which corresponds to the power mode? #195

AeroNotix opened this issue Jan 17, 2024 · 5 comments

Comments

@AeroNotix
Copy link

Hi,

looking to keep an eye on which power state a disk is in. E.g. IDLE_A, IDLE_B etc. Looking over the metrics being exported for the setup I have, nothing seems to indicate they cover the power state.

Am I missing something or is this an attribute which isn't currently exported?

@robbat2
Copy link
Contributor

robbat2 commented Jan 19, 2024

@AeroNotix to the best of what I can see from drives in my fleet, that is NOT something exported by underlying smartctl at all.

I don't even see it in sysfs that might be exported via node_exporter either.

@AeroNotix
Copy link
Author

sudo smartctl -i -n standby /dev/sde                                                                             ~
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.10-arch1-1] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate IronWolf
Device Model:     ST8000VN004-3CP101
Serial Number:    WWZ3TJ59
LU WWN Device Id: 5 000c50 0f67ac4ba
Firmware Version: SC60
User Capacity:    8,001,563,222,016 bytes [8.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database 7.3/5528
ATA Version is:   ACS-4 (minor revision not indicated)
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jan 19 20:48:39 2024 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Power mode was:   IDLE_A

smartctl -i reports this under Power mode was.

@k0ste
Copy link
Contributor

k0ste commented Jan 19, 2024

May be

[root@host]$ smartctl --json --info --health --attributes \
--tolerance=verypermissive --nocheck=standby \
--format=brief --log=error \
--get=apm /dev/sda | jq '.ata_apm'
{
  "enabled": true,
  "level": 128,
  "string": "minimum power consumption without standby",
  "max_performance": false,
  "min_power": true,
  "with_standby": false
}

@robbat2
Copy link
Contributor

robbat2 commented Jan 23, 2024

Nope, those aren't the same.
That is the power mode settings.

Not the power mode.

It looks like the smartmontools source has a function ataCheckPowerMode, but it's not exposed in JSON at all.

Please open an upstream ticket for smartmontools to add that data to the JSON.

@AeroNotix
Copy link
Author

smartmontools/smartmontools#239 upstream PR opened here.

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