DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 9th January 2009
giga giga is offline
Port Guard
 
Join Date: May 2008
Posts: 11
Default CPU temp

I am trying to get this CPU temp script to work:

http://wiki.bsdforen.de/howto/systemueberwachung

But when I run this script, I get an error:

ERROR: temperature.rrd: conversion of '67,0' to float not complete: tail ',0'

How can I fix it?

Code:
#!/bin/sh

cpu_temp="hw.acpi.thermal.tz0.temperature"
disk="/dev/ad0"

smartctl="/usr/local/sbin/smartctl"
smartarg="-A"
option="194"  # smart option for temp
cmd="/sbin/sysctl"
rrdtool="/usr/local/bin/rrdtool"
rrdfile="temperature.rrd"

h=`$smartctl $smartarg $disk | grep $option | awk '{print $10}'`
t=`$cmd $cpu_temp | awk '{print $2}' | sed -e s/C//`

# RRD Datenbank aktualisieren
$rrdtool update $rrdfile N:$t:$h
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:53 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick