I have a Python script that updates an rrd file with data it pulls from a database. Here is a snippet of the Python code
My problem is that the script crashes anytime there is a duplicate time stamp because rrdtool allows only one value per timestamp. Thus i get this error
Traceback (most recent call last):
File "rrdfile_update.py", line 40, in <module>
ret = rrdtool.update(ds_file.rrd,'%s:%s' %(time_stamp,rx_max));
rrdtool.error: ds_file: illegal attempt to update using time 1363358441 when last update time is 1363358441 (minimum one second step)
I will appreciate very much if you can help me with a Python try catch statement to help skip this error and continue to update the rrd file with the next timestamp and value so the script does not stop.
I have this code that gives this error on Linux and will be grateful if you can help
import rrdtool
try:
ret_asd = rrdtool.update(myfile.rrd,'N:%s:%s' %(metric1, metric2));
except rrdtool.error, e:
print e
When i run the above i get the below error
except... (1 Reply)
Hello all,
I am very new to shell scripting. I messed with basic examples in college, but this this the first work related project I am trying to work on. I am trying to test the rrdtool on our office wan link by measuring the bandwidth utilization. The script concept is fairly easy, but I am... (2 Replies)
Hi Guys,
Why do we use RRDtool in MRTG?
I have implemented MRTG for some routers,
I have read some notes about RRDTOOL also but don't know what is use of these tool.
Any one one please explain me the use of RRDTOOL in their own words? (1 Reply)
I'm having a question about for loops. (bash)
I have the following for example:
for file in `ls *.txt`
do
read file ...
done
Now when there is a file present there is no problem, now when there is no file present I get the following output in my standard mail box : "No such... (4 Replies)
I tried to compile the RRDtool on HP-UX (IA56). I have gcc-3.4.3 and perl 5.8.0
I got this:
Writing Makefile for RRDs
cd perl-shared && make
/opt/perl/bin/perl /opt/perl/lib/5.8.0/ExtUtils/xsubpp -typemap /opt/perl/lib/5.8.0/ExtUtils/typemap RRDs.xs > RRDs.xsc && mv... (2 Replies)