Strange behavior with rddtool update with crontab

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange behavior with rddtool update with crontab

alix-r

Hello.

I'm facing a strange behavior with a Bash script executed by CRONTAB.
The script works fine if I run it from the command line directly. However,
if I try to run  it time controlled by CRONTAB , I'm getting the following
error
message:

--1--
ERROR: temps.rrd: expected 3 data source readings (got 3) from N
39.6875
23.125

If I list the RRD-DB temps.rrd by

rrdtool fetch temps.rrd AVERAGE --start N-1000 --end N<

I can see that the organization  (just 2 values per entry) is correct.

                       rob_raum           rob_hzvor

1224742800: nan nan
1224742860: nan nan
1224742920: 3.9680094819e+01 2.3062500000e+01
1224742980: 3.9695577221e+01 2.3062500000e+01
1224743040: 3.9577488868e+01 2.3062500000e+01
1224743100: 3.9222938007e+01 2.3062500000e+01
1224743160: 3.9664530825e+01 2.3062500000e+01
1224743220: nan nan
1224743280: nan nan

Again, the script works correctly  executed via the command line. The
valid values above are entered that way. By CRONTAB execution, I do
not get entries due to the error.

Any idea what's wrong ?
(I'm new with RRDTOOLS and LINUX, hopefully the question is not stupid)

Thanks

alix-r
 
--
View this message in context: http://www.nabble.com/Strange-behavior-with-rddtool-update-with-crontab-tp20145204p20145204.html
Sent from the RRDTool - User mailing list archive at Nabble.com.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior with rddtool update with crontab

alix-r

Because some guys advised to use always full paths.
I did , in crontab as well as in the script I'm starting .

Regards alix-r



alix-r wrote:

>
> Hello.
>
> I'm facing a strange behavior with a Bash script executed by CRONTAB.
> The script works fine if I run it from the command line directly. However,
> if I try to run  it time controlled by CRONTAB , I'm getting the following
> error
> message:
>
> --1--
> ERROR: temps.rrd: expected 3 data source readings (got 3) from N
> 39.6875
> 23.125
>
> If I list the RRD-DB temps.rrd by
>
> rrdtool fetch temps.rrd AVERAGE --start N-1000 --end N<
>
> I can see that the organization  (just 2 values per entry) is correct.
>
>                        rob_raum           rob_hzvor
>
> 1224742800: nan nan
> 1224742860: nan nan
> 1224742920: 3.9680094819e+01 2.3062500000e+01
> 1224742980: 3.9695577221e+01 2.3062500000e+01
> 1224743040: 3.9577488868e+01 2.3062500000e+01
> 1224743100: 3.9222938007e+01 2.3062500000e+01
> 1224743160: 3.9664530825e+01 2.3062500000e+01
> 1224743220: nan nan
> 1224743280: nan nan
>
> Again, the script works correctly  executed via the command line. The
> valid values above are entered that way. By CRONTAB execution, I do
> not get entries due to the error.
>
> Any idea what's wrong ?
> (I'm new with RRDTOOLS and LINUX, hopefully the question is not stupid)
>
> Thanks
>
> alix-r
>  
>

--
View this message in context: http://www.nabble.com/Strange-behavior-with-rddtool-update-with-crontab-tp20145204p20147125.html
Sent from the RRDTool - User mailing list archive at Nabble.com.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior with rddtool update with crontab

Andy Riebs
In reply to this post by alix-r
Please send the `crontab -l` listing of the command that you are using,
and the script you are invoking (unless you are invoking rrdtool
directly from crontab); this might help to understand what's going on.

Andy

On Friday 24 October 2008, alix-r wrote:

> Hello.
>
> I'm facing a strange behavior with a Bash script executed by CRONTAB.
> The script works fine if I run it from the command line directly.
> However, if I try to run  it time controlled by CRONTAB , I'm getting
> the following error
> message:
>
> --1--
> ERROR: temps.rrd: expected 3 data source readings (got 3) from N
> 39.6875
> 23.125
>
> If I list the RRD-DB temps.rrd by
>
> rrdtool fetch temps.rrd AVERAGE --start N-1000 --end N<
>
> I can see that the organization  (just 2 values per entry) is
> correct.
>
>                        rob_raum           rob_hzvor
>
> 1224742800: nan nan
> 1224742860: nan nan
> 1224742920: 3.9680094819e+01 2.3062500000e+01
> 1224742980: 3.9695577221e+01 2.3062500000e+01
> 1224743040: 3.9577488868e+01 2.3062500000e+01
> 1224743100: 3.9222938007e+01 2.3062500000e+01
> 1224743160: 3.9664530825e+01 2.3062500000e+01
> 1224743220: nan nan
> 1224743280: nan nan
>
> Again, the script works correctly  executed via the command line. The
> valid values above are entered that way. By CRONTAB execution, I do
> not get entries due to the error.
>
> Any idea what's wrong ?
> (I'm new with RRDTOOLS and LINUX, hopefully the question is not
> stupid)
>
> Thanks
>
> alix-r
>
> --
> View this message in context:
> http://www.nabble.com/Strange-behavior-with-rddtool-update-with-cront
>ab-tp20145204p20145204.html Sent from the RRDTool - User mailing list
> archive at Nabble.com.
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users



--
Andy Riebs
(w) +1.978.748.0043    [hidden email]
(h) [hidden email]
My opinions are not necessarily those of HP

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior with rddtool update with crontab

alix-r
In reply to this post by alix-r


Thanks Andy and the others, for offering your help.

But I already found the reason for the issue. It was my own fault!

In fact,  one of the paths in a Shell script crontab is calling were
missing.
Due to some macro expansions I missed a path . Unfortunately there were
an old DB with the same name , but with a different organization at the
folder the program with the missing path pointed to.

I'm sorry for bothering you. But it's very hard a beginner , to start with
Linux, OWFS and RRDTOOL at the same time.

Thanks a lot for all your help again.    

Robert (alix-r)


--
View this message in context: http://www.nabble.com/Strange-behavior-with-rddtool-update-with-crontab-tp20145204p20149720.html
Sent from the RRDTool - User mailing list archive at Nabble.com.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

update mising value

Francesco Andreozzi
Hi all...
i have a simple question.... (i hope it simple!)

im using rrdtool to collect data from one device... this device is a  
remote device ...
evrything works great except some network problem ,,, when this  
problem happen i cant collect data, so i have NaN in my rrd db ...

this is ok ,  to try to solve this problem, i  did a local collection  
on a txt file on the remote device , in this way i can retrive the  
missing data ....

my question is, how i can put this old data into my rrdtool db ? if i  
did a rrdtool update with the missing timestamp and the missing values  
seems to be not working, i recive an error from the rrtool utility  
about wrong timestamp...

some one in this list did something like that ? any suggestions ?
thanks for your help.

ciao
Francesco

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: update mising value

Andy Riebs
Hi Francesco,

rrdtool doesn't have an update function such as this; it presumes that
data will be stored in serial order, as it becomes available.

If the missing data are cumulative, you can just enter the latest data
when it does become available, and let rrdtool extrapolate the
intermediate values.

If you *really* need to insert old missing data, you will probably have to
dump the database, insert the corrected data, and re-load it.

hth!
Andy

On Friday 24 October 2008 09:15:51 am Francesco Andreozzi wrote:

> Hi all...
> i have a simple question.... (i hope it simple!)
>
> im using rrdtool to collect data from one device... this device is a
> remote device ...
> evrything works great except some network problem ,,, when this
> problem happen i cant collect data, so i have NaN in my rrd db ...
>
> this is ok ,  to try to solve this problem, i  did a local collection
> on a txt file on the remote device , in this way i can retrive the
> missing data ....
>
> my question is, how i can put this old data into my rrdtool db ? if i
> did a rrdtool update with the missing timestamp and the missing values
> seems to be not working, i recive an error from the rrtool utility
> about wrong timestamp...
>
> some one in this list did something like that ? any suggestions ?
> thanks for your help.
>
> ciao
> Francesco
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users



--
Andy Riebs,  HP Scalable Computing and Infrastructure / Linux R&D
(w) [hidden email]     Technology for better business outcomes
    +1 (978) 748-0043 (Mon,Thu,Fri)
    +1 (508) 467-3002 (Tue,Wed)
(h) [hidden email]  My opinions are not necessarily those of HP

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users