New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
Display the HDD temperature in the web portal [patch]
Re: Display the HDD temperature in the web portal [patch]
Of course, thanks. Fixed.
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
Re: Display the HDD temperature in the web portal [patch]
Could anyone please fix the patch so that it works with the latest updates?
Maybe Excito could make the temperature info default in the next version? :)
Maybe Excito could make the temperature info default in the next version? :)
Re: Display the HDD temperature in the web portal [patch]
After updating software to Version 2.3 the temperature display is gone and I didn´t succeed in installing it again, I get this message:
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -urN admin//controllers/stat.php ../admin/controllers/stat.php
|--- admin//controllers/stat.php 2010-09-30 14:32:21.000000000 +0200
|+++ ../admin/controllers/stat.php 2010-11-10 11:21:15.000000000 +0100
--------------------------
Patching file admin//controllers/stat.php using Plan A...
Hunk #1 FAILED at 79.
1 out of 1 hunk FAILED -- saving rejects to file admin//controllers/stat.php.rej
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -urN admin//views/default/stat/stat_view.php ../admin/views/default/stat/stat_view.php
|--- admin//views/default/stat/stat_view.php 2010-09-30 14:32:33.000000000 +0200
|+++ ../admin/views/default/stat/stat_view.php 2010-11-10 11:22:10.000000000 +0100
--------------------------
Patching file admin//views/default/stat/stat_view.php using Plan A...
Hunk #1 FAILED at 17.
1 out of 1 hunk FAILED -- saving rejects to file admin//views/default/stat/stat_view.php.rej
done
does the patch need some enhancements in order to work again?
kind regards,
Mirador
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -urN admin//controllers/stat.php ../admin/controllers/stat.php
|--- admin//controllers/stat.php 2010-09-30 14:32:21.000000000 +0200
|+++ ../admin/controllers/stat.php 2010-11-10 11:21:15.000000000 +0100
--------------------------
Patching file admin//controllers/stat.php using Plan A...
Hunk #1 FAILED at 79.
1 out of 1 hunk FAILED -- saving rejects to file admin//controllers/stat.php.rej
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -urN admin//views/default/stat/stat_view.php ../admin/views/default/stat/stat_view.php
|--- admin//views/default/stat/stat_view.php 2010-09-30 14:32:33.000000000 +0200
|+++ ../admin/views/default/stat/stat_view.php 2010-11-10 11:22:10.000000000 +0100
--------------------------
Patching file admin//views/default/stat/stat_view.php using Plan A...
Hunk #1 FAILED at 17.
1 out of 1 hunk FAILED -- saving rejects to file admin//views/default/stat/stat_view.php.rej
done
does the patch need some enhancements in order to work again?
kind regards,
Mirador
Re: Display the HDD temperature in the web portal [patch]
Okay...artoo wrote:Could anyone please fix the patch so that it works with the latest updates?
Maybe Excito could make the temperature info default in the next version?
Code: Select all
---\sadmin/controllers/stat.php\t2011-08-03\s16:11:51.000000000\s+0200
+++\sadmin.patched/controllers/stat.php\t2011-08-17\s10:22:51.000000000\s+0200
@@\s-85,7\s+85,8\s@@\sclass\sStat\sextends\sController{
\s\t\t$sdata['totalspace']=number_format($totalspace,0,'\s','\s');
\s\t\t$sdata['percentused']=intval(100*(($totalspace-$freespace)/$totalspace));
\s\t\t$sdata['notifications']\s=\s$this->notify->list_all();
-\s\s\s\s\s\s\s\s$sdata['printers']\s=\s$this->_getprinters();
+\t\t$sdata['hddtemp']\s=\s$this->_getdisk('/dev/sda');
+\t\t$sdata['printers']\s=\s$this->_getprinters();
\s
\s\t\tif($strip){
\s\t\t\t$this->load->view(THEME.'/stat/stat_view',$sdata);
---\sadmin/views/default/stat/stat_view.php\t2011-08-05\s13:58:50.000000000\s+0200
+++\sadmin.patched/views/default/stat/stat_view.php\t2011-08-17\s10:23:14.000000000\s+0200
@@\s-24,6\s+24,10\s@@
\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s<td><?=$freespace?>\sMB</td>
\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s</tr>
\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s<tr>
+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s<td\sclass="ui-stat-list-col1"><?=t('HDD\stemperature')?></td>
+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s<td><?=$hddtemp['temp']?></td>
+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s</tr>
+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s<tr>
\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s<td\sclass="ui-stat-list-col1"><?=t('Uptime')?></td>
\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s<td>
\s\t\t\t\t\t\t<?\sif($uptime[0]>0)\sprint($uptime[0]."\s".t('days')."\s");\s?>
Re: Display the HDD temperature in the web portal [patch]
Hi guys.
As a long time lurker in this forum, and being a very satisfied customer/owner of the Bubba B3/2TB/WLAN beautybox, the time has now come for my first (serious) post and support question.
It seems that I just can't get this "Display HDD temperature in web interface" thing to work after the 2.3.0.x upgrade.
http://wiki.excito.org/wiki/index.php/D ... _interface
(It worked flawlessly before this upgrade)
I must admit that I didn't try the patch, but took the diffs from the gui_hdd.patch file and made the changes directly in the relevant files.
I ssh'ed into the server, changed to root and used nano for the editing.
In the file /usr/share/web-admin/admin/controllers/stat.php
In the file /usr/share/web-admin/admin/views/default/stat/stat_view.php
Gives the following php-error:

hddtemp is installed, and this command (as root in terminal):
Gives me the following promising result:
I've tried the obvious things like changing labeltext, commenting out code etc. and seeing that it is actually the correct files that I'm working on...
Being a php noob, and realizing that my ancient COBOL coding skills from way back doesn't help me that much here, I hope you guys can give me a hand.
Any hints or pointers to get this working is appreciated.
@excito: when will we see this functionality as built into the gui?
Thanks in advance
Kenneth
As a long time lurker in this forum, and being a very satisfied customer/owner of the Bubba B3/2TB/WLAN beautybox, the time has now come for my first (serious) post and support question.
It seems that I just can't get this "Display HDD temperature in web interface" thing to work after the 2.3.0.x upgrade.
http://wiki.excito.org/wiki/index.php/D ... _interface
(It worked flawlessly before this upgrade)
I must admit that I didn't try the patch, but took the diffs from the gui_hdd.patch file and made the changes directly in the relevant files.
I ssh'ed into the server, changed to root and used nano for the editing.
In the file /usr/share/web-admin/admin/controllers/stat.php
Code: Select all
function info(){
$sdata["version"] = get_package_version('bubba-frontend');
$sdata['uptime'] = uptime();
$sdata['partitions']["home"] = $this->_getvolume('/home/');
$sdata['partitions']["system"] = $this->_getvolume('/');
$sdata['disks']["sda"] = $this->_getdisk('/dev/sda');
$sdata['hddtemp'] = $this->_getdisk('/dev/sda');
$sdata['printers'] = $this->_getprinters();
header("Content-type: application/json");
print json_encode($sdata);
}
Code: Select all
<tr>
<td class="ui-stat-list-col1"><?=t('HDD temperature')?>$
<td><?=$hddtemp['temp']?></td>
</tr>

hddtemp is installed, and this command (as root in terminal):
Code: Select all
hddtemp /dev/sda
Code: Select all
/dev/sda: WDC WD20EARS-00MVWB0: 44°C

Being a php noob, and realizing that my ancient COBOL coding skills from way back doesn't help me that much here, I hope you guys can give me a hand.
Any hints or pointers to get this working is appreciated.
@excito: when will we see this functionality as built into the gui?

Thanks in advance
Kenneth
Re: Display the HDD temperature in the web portal [patch]
In the patch I posted above, you could have read that patching of stat.php should start at line 85. The correct place for the hddtemp entry is in the function called `index`, not `info`.
To automagically fetch and convert the previous post to a working patch file, run the following command on your B3
Patch as described in the wiki
To automagically fetch and convert the previous post to a working patch file, run the following command on your B3
Code: Select all
wget "http://forum.excito.net/viewtopic.php?f=8&t=2662&start=15" -O /dev/stdout \
| grep -A 12 "<div id=\"p16536\"" | grep "<code>" \
| sed "s/^.*<code>//" | sed "s/<\/code>.*$//" \
| sed "s/<br[^>]*>/\n/g" | sed "s/"/\"/g" \
| sed "s/</</g" | sed "s/>/>/g" \
| sed "s/[/\[/g" | sed "s/]/\]/g" \
| sed "s/\\\s/ /g" \
| sed "s/\\\t/\t/g" > gui-hddtemp.patch
Re: Display the HDD temperature in the web portal [patch]

Thanks, Gordon - I'll fiddle a little with that!
I learned a lesson or two today about patch files, and I better dive into patching things the proper way I can see...
Kenneth
Re: Display the HDD temperature in the web portal [patch]
Feature request understood, we'll add this to our vanilla release from the planned 2.4 (a few months away).
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
Re: Display the HDD temperature in the web portal [patch]
Hello,
Temperature in Bubbamon is still working great!
If you are using mozilla firefox plugin.
Puma
Temperature in Bubbamon is still working great!
If you are using mozilla firefox plugin.
Puma
Linux is like a wigwam - no windows, no gates, apache inside!
Re: Display the HDD temperature in the web portal [patch]
If I have a Bubba Storage, can I get the temperature from both hdds?
Re: Display the HDD temperature in the web portal [patch]
Hello,
If hhdtemp is installed you can see the hdd of the bubba (sda) and the storage (sdb)
log in as root: with su
then:
hddtemp /dev/sda
hddtemp /dev/sdb
You will get something like: WDC WD10000.... : 40 C.
Via bubbamon you will get only sdb your bubba harddrive temp.
This is the most important temperature (it wil get approx. 3 or 4 degrees hotter then the storage).
Hoping to have you informed sufficiently,
Regards,
Puma
If hhdtemp is installed you can see the hdd of the bubba (sda) and the storage (sdb)
log in as root: with su
then:
hddtemp /dev/sda
hddtemp /dev/sdb
You will get something like: WDC WD10000.... : 40 C.
Via bubbamon you will get only sdb your bubba harddrive temp.
This is the most important temperature (it wil get approx. 3 or 4 degrees hotter then the storage).
Hoping to have you informed sufficiently,
Regards,
Puma
Linux is like a wigwam - no windows, no gates, apache inside!
Re: Display the HDD temperature in the web portal [patch]
i get this error
Patching file admin//views/default/stat/stat_view.php using Plan A...
Hunk #1 FAILED at 17.
1 out of 1 hunk FAILED -- saving rejects to file admin//views/default/stat/stat_view.php.rej
done
any ideas ?
Patching file admin//views/default/stat/stat_view.php using Plan A...
Hunk #1 FAILED at 17.
1 out of 1 hunk FAILED -- saving rejects to file admin//views/default/stat/stat_view.php.rej
done
any ideas ?
Re: Display the HDD temperature in the web portal [patch]
Exactly the same error occurs on my system:
I am running software version 2.4
Why is this not yet implemented in the default system?
Thanks,
P
Code: Select all
Patching file admin//views/default/stat/stat_view.php using Plan A...
Hunk #1 FAILED at 17.
1 out of 1 hunk FAILED -- saving rejects to file admin//views/default/stat/stat_view.php.rej
done
Why is this not yet implemented in the default system?
Thanks,
P
Re: Display the HDD temperature in the web portal [patch]
New patch file...
unpack with command (I'm not allowed to attach a file with .patch extension)
unpack with command (I'm not allowed to attach a file with .patch extension)
Code: Select all
tar -xzf gui-hddtemp.tgz
- Attachments
-
- gui-hddtemp.tgz
- HDD temperature patch for B3 software version 2.4
- (635 Bytes) Downloaded 980 times
Re: Display the HDD temperature in the web portal [patch]
The latest patch file works partly for version 2.5.0.2 .
The first of the two patches is applied, but the second one fails.
This is because there is now a new item ('Available') between 'Disk capacity' and 'Uptime'.
I added the extra lines by hand, and I can now see the disk temperature on the status page of the B3 web interface.
Could someone who is more familiar with creating patch files than me perhaps fix the patch file?
The first of the two patches is applied, but the second one fails.
This is because there is now a new item ('Available') between 'Disk capacity' and 'Uptime'.
I added the extra lines by hand, and I can now see the disk temperature on the status page of the B3 web interface.
Could someone who is more familiar with creating patch files than me perhaps fix the patch file?