Version: 1.2.0 (using KDE KDE 3.1.1a) OS: Linux Most modern harddisks have a temperature sensor built-in. I'd like to have these temperatures to be measured/reported in ksysguard.
Hmm.. instead of just using the sensors library, we might also want to query SMART
Renamed the wish, since it's all about SMART data sensors.
Google's drive survey suggests that SMART data is not that useful
This is non trivial. We can't easily get SMART data as root.
This is *very* trivial smartctl /dev/sda -a -d ata | grep "^194" 194 Temperature_Celsius 0x0032 253 253 000 Old_age Always - 51 Tells you this drive is running a bit hot at 51 degrees celsius
That assumes that the drive is sata, and doesn't work on my scsi system. Also, your output is very different from mine: [root@gmartynstudent-2 ~]# smartctl /dev/sda -a | grep "Temperature" Temperature Warning Enabled Current Drive Temperature: 57 C Drive Trip Temperature: 65 C
I know this duplicates another bug, but it is related to this one as well: How about a ksysguard module where you can add new sensors. More then happy to do this in an xml file, as for the applet. Example <sensor name="My custom sensor" group="harddisk" type="float" min="0" max="100" alarm="55" cmd="/usr/bin/my_custom_sensor_command" />
Andy, $ smartctl /dev/sda -a -d ata smartctl version 5.36 [x86_64-unknown-linux-gnu] Copyright (C) 2002-6 Bruce Allen Home page is http://smartmontools.sourceforge.net/ Smartctl open device: /dev/sda failed: Permission denied We can't open it as non-root. We'd need a setuid program etc
How about the external command then, so that users can add custom sensors, like in the example I gave above.
that would be a dupe of bug #127801
We don't need a suid binary necessarily -- there is already info that is available when run as root that isn't available as a user (logfiles come to mind). The thing that's really stopping the implementation of this is the Google study that found the SMART data to be worthless. If anyone has more information, or a different interpretation of the Google results, then please speak up. I'll leave this at low priority and might get around to it some day.
this should be trivial; example: hddtemp /dev/sda /dev/sda: WDC WD1600BB-22RDA0: 32°C hddtemp can also run as a daemon, with data available via TCP at a specified port: # ps -elf | grep -i hddtemp 1 S root 7117 1 0 80 0 - 686 select 23:18 ? 00:00:00 hddtemp -d -f /etc/hddtemp.db -p 7634 /dev/sda # netcat localhost 7634 |/dev/sda|WDC WD1600BB-22RDA0|32|C|wally.blilly.net:/root hddtemp is hosted at https://savannah.nongnu.org/projects/hddtemp/ hddtemp is included in openSuSE, and as there are RPM and Debian packages available, it should be present in most Linux distributions As for the Google study, claiming that it "found the SMART data to be worthless" is an exaggeration and an oversimplification. In particular, temperature indication is far from "worthless". Regardless of the value of temperature data for the hard drive per se, in many systems (i.e. those lacking mother board temperature sensors) the drive's SMART sensor may be the only available indication of computer internal temperature; the eMachines W3503 system that I'm typing this on is one example.
Bruce, it looks good - but again - we can't get the data as a non-root user. You can run it attached to a TCP port, but it's going to be a fair amount of work to get this to work nicely for the user. We would have to ask for a root password to launch hddparm etc.
John, Several corrections/comments: 1. as hddtemp is suid root, any user can use it to get data [on openSuSE 11.0]: # ls -l $(whence hddtemp) -rwsr-sr-x 1 root root 86543 Sep 8 2007 /usr/sbin/hddtemp 2. hddtemp (like other daemons) is started (as root) by rc/init; any user can read the daemon's TCP port 3. on openSuSE, setting up hddtemp is trivial (modulo the distribution changing between hda and sda for hard drive designations...) via /etc/sysconfig
FWIW, Kima(http://kde-apps.org/content/show.php/Kima+-+kicker+monitoring+applet?content=33257) queries the hddtemp daemon if running (maybe there's some stealable code there...)
switched to GNOME
Well, that is sad. I was just planning the opposite and found Ksysgurad to match my needs quite nicely. Except that the hddtemp readings would be really welcomed addition. And as already stated by bruce, it should be quite possible to add the hddtemp readings without any need to ask for root password. Just make the assumption that the user has installed the hddtemp and the daemon is already running. All the necessary information about the available hard disks are in the return value from the daemon, e.g. |/dev/sda|SAMSUNG SP1614C|33|C||/dev/sdb|SAMSUNG SP1614C|35|C| One thing that might require user to configure the Ksysguard is the hddtempd port, but only if the user has decided to alter it in the first place. You could of course just not support that and require the port 7634.
Created attachment 77704 [details] hddtemp integration patch Found Maurizio Monge's patch for integrating hddtemp into ksysguard here: http://lists.kde.org/?l=kde-devel&m=110701672111263. Updated Maurizio's patch for KDE 4.9.5 and removed the nvidia pieces, and tried it out. I suspect it needs a little bit of clean up, for instance by adding a hddtemp use flag on it, and some conditionals based on that around some of the code, though I hope it's a useful starting point ...
Created attachment 77789 [details] hddtemp integration patch Updated patch with correct number of lines in smart.c
Created attachment 88796 [details] Using hddtemp from ksysguard I also needed to display disk drive temperatures in ksysguard and achieved it in the following way: 1. Install hddtemp 2. Make it SUID root if not already so 3. Download the perlscript I attached and make it executable 4. Go to "File"-> "Monitor remote machines" 5. Add something in the Host field, doesn't matter what 6. Select "Custom command" 7. Add the path to the script in "Command" and press Ok 8. Use the data and enjoy
Created attachment 88802 [details] attachment-24530-0.html That is amazing! Thank you so much :) On 22 September 2014 23:05, <dag@newtech.fi> wrote: > https://bugs.kde.org/show_bug.cgi?id=58154 > > dag@newtech.fi changed: > > What |Removed |Added > > ---------------------------------------------------------------------------- > CC| |dag@newtech.fi > > --- Comment #20 from dag@newtech.fi --- > Created attachment 88796 [details] > --> https://bugs.kde.org/attachment.cgi?id=88796&action=edit > Using hddtemp from ksysguard > > I also needed to display disk drive temperatures in ksysguard and achieved > it > in the following way: > > 1. Install hddtemp > 2. Make it SUID root if not already so > 3. Download the perlscript I attached and make it executable > 4. Go to "File"-> "Monitor remote machines" > 5. Add something in the Host field, doesn't matter what > 6. Select "Custom command" > 7. Add the path to the script in "Command" and press Ok > 8. Use the data and enjoy > > -- > You are receiving this mail because: > You voted for the bug. >
ksysguard is no longer maintained, in Plasma 6 there is the Plasma system monitor for this task. If your wish is still valid for the Plasma 6 replacement, please re-open and we can move this bug to the new product, thanks!