I want to see smart data for hard drives but when I run smartctl -a /dev/sda it shows /usr/sbin/smartctl: Permission denied.
Tried with sudo etc but not working.
Tried with sudo etc but not working.
root@XXX:~# pveversion
pve-manager/4.0-59/a1588972 (running kernel: 4.2.3-2-pve)
root@XXX:~# smartctl -a /dev/sda
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-4.2.3-2-pve] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: Crucial_CT500MX200SSD1
Serial Number: 15050E8F2960
LU WWN Device Id: 5 00a075 10e8f2960
Firmware Version: MU01
User Capacity: 500,107,862,016 bytes [500 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-3 T13/2161-D revision 4
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Nov 22 23:16:41 2015 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
[...]
Seems you are using the Proxmox VE 4.0 OVH installation template?
If yes, please open a ticket on OVH and ask why the set a custom permission - looks like a bug to me on their installation image.
Yes its OVH installation Template...can I change permissions by myself, because I am administrator of server and have full access to everything in Proxmox and Server with IPMI.
Please open a ticket on OVH and ask why the set a custom permission.
sub read_temp {
my ($dev) = @_; # e.g. 'sda'
my $path = "/run/hddtemp/$dev.temp";
return 'N/A' unless -e $path && -r $path;
open my $fh, '<', $path or return 'N/A';
my $v = <$fh>;
close $fh;
defined $v ? do { chomp $v; $v eq '' ? 'N/A' : $v } : 'N/A';
}
$res->{HDDtemperatureSda} = read_temp("sda");
{
itemId: 'HDDtemperatureSda',
colspan: 2,
printBar: false,
title: gettext('HDD Temperature'),
textField: 'HDDtemperatureSda',
renderer: function(value) {
const n = Number(value); // value is a string
if (Number.isInteger(n) && n > 0) {
myValue = value;
} else {
return '/dev/sda: N/A';
}
return `/dev/sda: ${myValue} ℃`;
}
},
We use essential cookies to make this site work, and optional cookies to enhance your experience.