MauriceNino / dashdot

A simple, modern server dashboard, primarily used by smaller private servers
https://getdashdot.com/
MIT License
2.65k stars 101 forks source link

[Feature] Add hard drive temperature #688

Open Trymeagain opened 1 year ago

Trymeagain commented 1 year ago

Description of the feature

Can you add the hard disk temperature to the storage module, thank you.

Additional context

No response

MauriceNino commented 1 year ago

Hi there. How would you envision this feature? Like, where could the extra data be displayed for both the single drive view, and the multi-drive view?

Also, honestly, I don't even know if that data is even readable from within Docker - could you maybe send me an output of the following command:

docker container run -it --rm -v /:/mnt/host:ro --privileged mauricenino/dashdot yarn cli raw-data --storage
Trymeagain commented 1 year ago

Thanks for your reply, If possible, add a few more lines to the list of data on the left to show the temperature data for each drive.

but it looks like it is not possible to get the temperature data within docker.

const disks = [ { device: '/dev/nvme0n1', type: 'NVMe', name: 'SKHynix_HFS512GDE9X084N ', vendor: '', size: 512110190592, bytesPerSector: null, totalCylinders: null, totalHeads: null, totalSectors: null, totalTracks: null, tracksPerCylinder: null, sectorsPerTrack: null, firmwareRevision: '', serialNum: 'CSA3N627111003H2C', interfaceType: 'PCIe', smartStatus: 'unknown', temperature: null }

hillaliy commented 1 year ago

Hi I think you can use smartctl. You can pass the volume path to the container using the -v option: docker run -v /path/to/volume:/data my-image You will need to Install the smartmontools package inside the Docker container. The container will need to run as a privileged user.

It will be a nice feature

Trymeagain commented 1 year ago

I found can use lm-sensors directly within docker to get nvme temperature, so maybe can develop from that.

/app # sensors nvme-pci-0600 Adapter: PCI adapter Composite: +43.9°C (low = -0.1°C, high = +82.8°C) (crit = +83.8°C) Sensor 1: +36.9°C (low = -273.1°C, high = +65261.8°C) Sensor 2: +38.9°C (low = -273.1°C, high = +65261.8°C)

acpitz-acpi-0 Adapter: ACPI interface temp1: +27.8°C (crit = +110.0°C)

coretemp-isa-0000 Adapter: ISA adapter Package id 0: +41.0°C (high = +105.0°C, crit = +105.0°C) Core 0: +38.0°C (high = +105.0°C, crit = +105.0°C) Core 1: +39.0°C (high = +105.0°C, crit = +105.0°C) Core 2: +38.0°C (high = +105.0°C, crit = +105.0°C) Core 3: +42.0°C (high = +105.0°C, crit = +105.0°C)

nvme-pci-0100 Adapter: PCI adapter Composite: +39.9°C (low = -0.1°C, high = +74.8°C) (crit = +89.8°C)