Hello
Can anyone explain me one thing.
I have some ds18b20 sensors and cacti draw charts for them.
I get current temp. from sensor using python script.
I noticed that current temp in graph is a little overestimated compared to actual value. Sometimes the difference is about one degree.
In graph template item for current temp is set like that:
regards
shady
[solved] Current temperature value
Moderators: Developers, Moderators
[solved] Current temperature value
Last edited by shady79 on Fri Jan 09, 2015 7:13 am, edited 1 time in total.
Re: Current temperature value
Sounds like rrdtool consolidating data over time. read up http://docs.cacti.net/manual:088:8_rrdtool
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: Current temperature value
Thanks for replay.
I still have a problem with current value of temperature when it falls below 1
It is represented as 630.00 instead of 0.63
When I exported some data to csv file - values are as follows:
2015-01-08 17:50:00 1.0683333333e+00
2015-01-08 17:55:00 1.1861000000e+00
2015-01-08 18:00:00 1.1312000000e+00
2015-01-08 18:05:00 1.0614000000e+00
2015-01-08 18:10:00 1.0018000000e+00
2015-01-08 18:15:00 8.8240000000e-01
2015-01-08 18:20:00 8.8000000000e-01
2015-01-08 18:25:00 9.3880000000e-01
2015-01-08 18:30:00 8.1216666667e-01
Maybe I must tweak some settings in cacti but I have no idea where...
Regards
Shady
I still have a problem with current value of temperature when it falls below 1
It is represented as 630.00 instead of 0.63
When I exported some data to csv file - values are as follows:
2015-01-08 17:50:00 1.0683333333e+00
2015-01-08 17:55:00 1.1861000000e+00
2015-01-08 18:00:00 1.1312000000e+00
2015-01-08 18:05:00 1.0614000000e+00
2015-01-08 18:10:00 1.0018000000e+00
2015-01-08 18:15:00 8.8240000000e-01
2015-01-08 18:20:00 8.8000000000e-01
2015-01-08 18:25:00 9.3880000000e-01
2015-01-08 18:30:00 8.1216666667e-01
Maybe I must tweak some settings in cacti but I have no idea where...
Regards
Shady
Last edited by shady79 on Fri Jan 09, 2015 7:15 am, edited 1 time in total.
Re: Current temperature value
My script that gets the temperature..
Maybe here is a problem...
Code: Select all
import os, glob, sys
#import rrdtool
from time import sleep
# Load the 1-wire modules (if modules are loaded on boot these two lines can be commented out)
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
# Set up some variables
base_dir = '/sys/bus/w1/devices/'
devices = glob.glob(base_dir + '28*')
device_file = '/w1_slave'
def read_temp_file(device_file):
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines
def read(id):
device_dir = '/sys/bus/w1/devices/'+ id + device_file
raw_data = read_temp_file(device_dir)
while raw_data[0].find('YES') == -1:
sleep(0.1)
raw_data = read_temp_file(device_dir)
t_pos = raw_data[1].find('t=')
if t_pos != -1:
temp = float(raw_data[1][t_pos+2:]) / 1000
temp = round(temp,2)
print temp
# return temp
try:
read('28-0000051eb082')
except KeyboardInterrupt:
# quit
print('Exiting application')
sys.exit()
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: Current temperature value
This falls into this FAQ entry: http://docs.cacti.net/faq#show_exact_numbers
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: Current temperature value
Thanks that's itphalek wrote:This falls into this FAQ entry: http://docs.cacti.net/faq#show_exact_numbers
Who is online
Users browsing this forum: No registered users and 2 guests