View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 55 posts ] 
Go to page Previous  1, 2, 3, 4  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Tue Dec 12, 2006 1:45 am 
Offline
Joined: Mon Feb 13, 2006 7:10 pm
Posts: 36
Location: Australia
I have added a script to the wikithat uses mbmon to graph motherboard temperatures.

Let me know how it goes...

_________________
LinHES 7.1, Gigabyte GA-K8NXP-SLI m/b, Athlon 64 X2 4200+, 3Gb RAM, 80GB PATA (/ & /myth), 2TB SATA (/myth/tv), Gigabyte 8600GT component-out, 2x Dvico HDTV DVB-T Lite, 1x Hauppage HVR-2200 PCIe Dual, Harmony remote with Dvico IR receiver.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 5:55 am 
Offline
Joined: Sat Jun 25, 2005 7:39 pm
Posts: 162
shade4 wrote:
I have added a script to the wikithat uses mbmon to graph motherboard temperatures.

Let me know how it goes...

This doesn't seem to work. It shows the temps find as it adds them in to the DB. But there is nothing inside the image files. Also is there anyway the two temps could be put in to one image file to save space?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 6:49 am 
Offline
Joined: Mon Feb 13, 2006 7:10 pm
Posts: 36
Location: Australia
md10md wrote wrote:
This doesn't seem to work. It shows the temps find as it adds them in to the DB. But there is nothing inside the image files.


What temps are being reported? It just occurred to me that if your temps are in farenheit they may exceed the maximum value allowed for the graph (100 degrees). If that's not the case, then assuming your permissions are correct I'm not too sure what else to suggest.

md10md wrote wrote:
Also is there anyway the two temps could be put in to one image file to save space?


Good idea, will look into it.

_________________
LinHES 7.1, Gigabyte GA-K8NXP-SLI m/b, Athlon 64 X2 4200+, 3Gb RAM, 80GB PATA (/ & /myth), 2TB SATA (/myth/tv), Gigabyte 8600GT component-out, 2x Dvico HDTV DVB-T Lite, 1x Hauppage HVR-2200 PCIe Dual, Harmony remote with Dvico IR receiver.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 2:06 pm 
Offline
Joined: Sat Jun 25, 2005 7:39 pm
Posts: 162
For example, I just did this (and got this):
Code:
root@mythtv:~# rrd_mbtemp.pl
T 1 (/dev/cputemp) temp: 37.0 degrees C
T 2 (/dev/mbtemp) temp: 30.0 degrees C


But my two graphs show this (and the time code on the file shows they were updated when I ran the script):
Image
Image

Also, I dumped the rrd_mbtemp.rd DB file into XML and this is the top of the file (minus the history stuff in the bottom), notice that the values aren't showing up in the DB yet the DB is being created fine and the permissions are fine:

MB DB:
Code:
<!-- Round Robin Database Dump -->
<rrd>
   <version> 0001 </version>
   <step> 300 </step> <!-- Seconds -->
   <lastupdate> 1165953550 </lastupdate> <!-- 2006-12-12 14:59:10 EST -->

   <ds>
      <name> temp </name>
      <type> GAUGE </type>
      <minimal_heartbeat> 600 </minimal_heartbeat>
      <min> 0.0000000000e+00 </min>
      <max> 1.0000000000e+02 </max>

      <!-- PDP Status -->
      <last_ds> UNKN </last_ds>
      <value> 0.0000000000e+00 </value>
      <unknown_sec> 250 </unknown_sec>
   </ds>


CPU DB:
Code:
<!-- Round Robin Database Dump -->
<rrd>
   <version> 0001 </version>
   <step> 300 </step> <!-- Seconds -->
   <lastupdate> 1165953549 </lastupdate> <!-- 2006-12-12 14:59:09 EST -->

   <ds>
      <name> temp </name>
      <type> GAUGE </type>
      <minimal_heartbeat> 600 </minimal_heartbeat>
      <min> 0.0000000000e+00 </min>
      <max> 1.0000000000e+02 </max>

      <!-- PDP Status -->
      <last_ds> UNKN </last_ds>
      <value> 0.0000000000e+00 </value>
      <unknown_sec> 249 </unknown_sec>
   </ds>


I have no idea why it's doing this...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:24 am 
Offline
Joined: Mon Feb 13, 2006 7:10 pm
Posts: 36
Location: Australia
Might be worth deleting the db files so they are recreated from scratch. (/var/lib/rrd/cputemp.rrd & mbtemp.rrd)

Also I've made a small cosmetic change to the script on the wiki so it doesn't display /dev/cputemp etc as obviously they aren't devices.

_________________
LinHES 7.1, Gigabyte GA-K8NXP-SLI m/b, Athlon 64 X2 4200+, 3Gb RAM, 80GB PATA (/ & /myth), 2TB SATA (/myth/tv), Gigabyte 8600GT component-out, 2x Dvico HDTV DVB-T Lite, 1x Hauppage HVR-2200 PCIe Dual, Harmony remote with Dvico IR receiver.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 5:52 am 
Offline
Joined: Sat Jun 25, 2005 7:39 pm
Posts: 162
shade4 wrote:
Might be worth deleting the db files so they are recreated from scratch. (/var/lib/rrd/cputemp.rrd & mbtemp.rrd)

No luck. This is kind of bizarre.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 5:41 pm 
Offline
Joined: Mon Sep 19, 2005 4:41 am
Posts: 25
md10md wrote:
It sounds like a good idea but I'd personally like to keep the graphs all on a separate page as opposed to clogging up the index.html. You're free to tinker with the stuff as much as you want though and I'd love to see any new additions or revisions.

In that case, you would just create a very simple index page with text links to the sub pages. You can use my example below as a starting point, if you haven't created your own index page already.
Ok, here is my suggestion:
1) change the index.html so it looks like this:
Code:
<HTML>
<HEAD>
 <title>MythTV backend statistics</title>
</HEAD>

<BODY>
<h1><center>MythTV backend - statistics</center></h1>
<h2><center>Overview</center></h2>
<center<strong>CPU usage</strong></center>
<P>
<center><IMG SRC = "cpu-day.png"></center>
<center><a href="cpu-detail.html">detailed CPU statistics</a></center>
</P>

<center><strong>Memory usage</strong></center>
<P>
<center><IMG SRC = "memory-day.png"></center>
<center><a href="memory-detail.html">detailed memory statistics</a></center>
</P>

<center><strong>Disk access</strong></center>
<P>
<center><IMG SRC = "disk-day.png"></center>
<center><a href="disk-detail.html">detailed disk access statistics</a></center>
</P>

<center><strong>eth0 usage</strong></center>
<P>
<center><IMG SRC = "eth0-day.png"></center>
<center><a href="eth0-detail.html">detailed eth0 usage statistics</a></center>
</P>

</BODY>
</HTML>

2) add the necessary sub pages, here is cpu-detail.html as an example:
Code:
<html>
<head>
  <title>MythTV stats - cpu</title>
</head>

<body>
<h1><center>MythTV backend statistics</center></h1>
<h2><center>detailed CPU statistics</center></h2>
<P>
<center><IMG SRC = "cpu-day.png"></center>
<center><IMG SRC = "cpu-week.png"></center>
<center><IMG SRC = "cpu-month.png"></center>
<center><IMG SRC = "cpu-year.png"></center>
</P>

</body>
</html>

Create pages for the rest and you are done.
Note that formatting tags (like the center tag) are just for looks, the page will work without them.

_________________
Torfinn


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 8:24 pm 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
Set this up tonight. Works great. I even set up a link on my knoppmyth homepage.


Code:
...MythTV being installed and operational."<br>


Pasted the following html after the above line

Code:
<br><big>
<a href="rrdtool/index.html">System Status</a>:</big>
<br><br>"Mythbox System System Status using RRD_TOOL"<br>
Compliments of rickbassham at<a href="http://knoppmythwiki.org">Knoppmyth Wiki</a>
<br><br>


Thanks again rickbassham.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 26, 2006 8:58 am 
Offline
Joined: Sun Apr 16, 2006 10:30 am
Posts: 13
Just trying to give a little back. I can't count the number of times someone on this forum has helped me get through some issues I had with Knoppmyth.

I haven't had a chance to check out the mbmon script, but I'll give it a try in the next few days.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 26, 2006 11:07 pm 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
Now that rrdtools is in R5E50, I'd appreciate it if someone kept me updated on any changes.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 27, 2006 10:45 pm 
Offline
Joined: Tue Dec 12, 2006 8:44 am
Posts: 23
Well I have most things working mentioned on the wiki, but my disk usage shows little to no activity. Anyone have any idea how to debug, looks like maybe iostat -d is not changing much for me.....


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 28, 2006 12:28 am 
Offline
Joined: Sat Jun 25, 2005 7:39 pm
Posts: 162
cecil wrote:
Now that rrdtools is in R5E50, I'd appreciate it if someone kept me updated on any changes.

Just to make things blend in with the new theme better, change all color codes in the .pl script files from EAE9EE to 295990. More aesthetically pleasing, I think.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 28, 2006 10:53 pm 
Offline
Joined: Tue Dec 12, 2006 8:44 am
Posts: 23
Got mine up and working, mbmon doesn't work for me so I took a swing at getting lmsensors working ( i'm not a programmer, more like a hack :), if you want to modify/tweak, have at it) I'll attach what I have and it is working for my variables. It is based on the hddtemp.pl script, the script only collects cpu temp and the system temp (pretty much all I can get from my board), but you could do more if you wanted. Let me know if you want me to attach to the wiki how-to.

rrd_lmsensors.pl

Quote:
#!/usr/bin/perl
#
# copyright Martin Pot 2003
# http://martybugs.net/linux/hddtemp.cgi
#
# rrd_lmsensors.pl

use RRDs;

# define location of rrdtool databases
my $rrd = '/var/lib/rrd';
# define location of images
my $img = '/mnt/share/rrd-data';

# process each variable specified in lmsensors outpurt (add/delete others as supported by motherboard)
&ProcessLMSENSOR("CPU Temp", "CPU Temp", "cputemp" );
&ProcessLMSENSOR("temp3", "System Temp", "systemp");

sub ProcessLMSENSOR
{
# process LMSENSOR
# inputs: $_[0]: Variables that you want to display, CPU temp, systemp, etc...
# $_[1]: Description of variable
# $_[2]: Database names

# get LMSENSOR temps for whatever your motherboard supports
my $temp=`sensors |grep '$_[0]'|cut -d"+" -f2|cut -d" " -f1`;
# remove eol chars and white space
$temp =~ s/[\n ]//g;

print "$_[1]: $temp degrees C\n";

# if rrdtool database doesn't exist, create it
if (! -e "$rrd/$_[2].rrd")
{
print "creating rrd database for $_[2]...\n";
RRDs::create "$rrd/$_[2].rrd",
"-s 300",
"DS:temp:GAUGE:600:0:100",
"RRA:AVERAGE:0.5:1:576",
"RRA:AVERAGE:0.5:6:672",
"RRA:AVERAGE:0.5:24:732",
"RRA:AVERAGE:0.5:144:1460";
}

# insert value into rrd
RRDs::update "$rrd/$_[2].rrd",
"-t", "temp",
"N:$temp";

# create graphs
&CreateGraph($_[2], "day", $_[1]);
&CreateGraph($_[2], "week", $_[1]);
&CreateGraph($_[2], "month", $_[1]);
&CreateGraph($_[2], "year", $_[1]);
}

sub CreateGraph
{
# creates graph
# inputs: $_[0]: lmsensor variable (ie, CPU Temp, tempx, etc)
# $_[1]: interval (ie, day, week, month, year)
# $_[2]: Description

RRDs::graph "$img/$_[0]-$_[1].png",
"--lazy",
"-s -1$_[1]",
"-t $_[2]",
"-h", "80", "-w", "600",
"-a", "PNG",
"-v degrees C",
"DEF:temp=$rrd/$_[0].rrd:temp:AVERAGE",
"LINE2:temp#0000FF:$_[2]",
"GPRINT:temp:MIN: Min\\: %2.lf",
"GPRINT:temp:MAX: Max\\: %2.lf",
"GPRINT:temp:AVERAGE: Avg\\: %4.1lf",
"GPRINT:temp:LAST: Current\\: %2.lf degrees C\\n";
if ($ERROR = RRDs::error) { print "$0: unable to generate $_[0] graph: $ERROR\n"; }
}


:D


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 21, 2007 1:05 am 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
Installed the rrdtoolss on my R5C7 MBE from the Monitoring Graphs howto.

Great Work! Now I will have to get the CPU temp. mbmon doesn't work correclty for My K8N Neo4.

Andy

_________________
KnoppMyth R5.5
MBE: AMD64 3400+, K8N Neo4 Plat., 1Gig, Asus Extreme N6200, 320G pata, 2x320Gsata, 750Gsata, PVR-150 Retail w/Blaster
SBE: AMD XP2000, GA 7ZMMH, 1 Gig, XFX 256M 6200, 20 Gig, PVR-150 Retail w/Blaster
SBE: AMD Dur1800, 512M, PVR500


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 21, 2007 10:15 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Actually I believe that it uses mbmon to get that stuff...


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ] 
Go to page Previous  1, 2, 3, 4  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu