Sponsored Content
Top Forums Shell Programming and Scripting Python-rrdtool try except rrdtool.error module object has no attribute error Post 302958274 by kaf3773 on Tuesday 20th of October 2015 05:09:27 PM
Old 10-20-2015
Python-rrdtool try except rrdtool.error module object has no attribute error

I have this code that gives this error on Linux and will be grateful if you can help
Code:
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
Code:
except rrdtool.error, e:
AttributeError: 'module' object has no attribute 'error'

The code is intended to skip this error while updating the rrd file
Code:
illegal attempt to update using time 1363358441 when last update time is 1363358441 (minimum one second step)

Appreciate if you can help me get a solution for this

Thanks

Last edited by kaf3773; 10-20-2015 at 06:22 PM..
 

5 More Discussions You Might Find Interesting

1. HP-UX

compiling the RRDtool

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)
Discussion started by: Kalin
2 Replies

2. Shell Programming and Scripting

Debian, digitemp, rrdtool

Mit perlscript: #!/usr/bin/perl # # copyright Per Hansen 2009 # # # temp.pl use lib qw(/opt/rrdtool-1.4.1/lib/perl); use RRDs; # sti til rrdtool databases my $rrd = '/var/lib/rrd'; # sti til færdige grafer (1 Reply)
Discussion started by: perhansen
1 Replies

3. UNIX for Dummies Questions & Answers

rrdtool question

Hi, DEF:clients=cccam.rrd:kliensek:AVERAGE DEF:activeclients=cccam_actclient.rrd:activeclients:AVERAGE "LINE1:clients#0000FF:Connected clients" COMMENT:" \n" "LINE2:activeclients#99FF00:Active clients" COMMENT:" \n" GPRINT:clients:LAST:'Current'\%5.0lf%s COMMENT:" \n"... (2 Replies)
Discussion started by: adriankoooo
2 Replies

4. Red Hat

Why do we use RRDtool in MRTG?

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)
Discussion started by: manalisharmabe
1 Replies

5. Shell Programming and Scripting

Python rrdtool try catch statement

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 for i in range(numrowed): row = curred.fetchone() time_stamp = row rx_max = row ret =... (1 Reply)
Discussion started by: kaf3773
1 Replies
RRDCOLLECT(8)							    RRDcollect							     RRDCOLLECT(8)

NAME
RRDcollect -- Round-Robin Database Collecting Daemon. SYNOPSIS
rrdcollect [option]... DESCRIPTION
The rrdcollect daemon is responsible for fetching statistical data from various soures (listed in rrdcollect.conf), typically files under /proc/ directory. It periodically reads them and searches for patterns from configuration file. Values are then stored inside rrdtool's .rrd files. OPTIONS
RRDcollect follows the usual GNU command line syntax, with long options starting with two dashes (`-'). General options -c file --config=file Specifies which file should be read instead of default config file. -n --no-fork Program will not fork. Very useful when testing or debugging. -v --verbose Increase verbosity. This option also implies --no-fork, since you probably don't want RRDcollect in daemon mode trashing your termi- nal. RRD update options -o file --output=file Specifies file to which rrdtool(1)-style commands should be written. If file you specify is `-' (hyphen), then commans are written to standard output (this case implies --no-fork). -p --pipe --pipe=program When this option is used, RRDcollect will open pipe to rrdtool(1) program and send it update commands. If you don't give program, the compiled-in default is assumed (either `rrdtool - >/dev/null' or full path to rrdtool(1) binary). The program option can be specified as a full path or just a command name, in the latter case the program should reside on PATH. If no RRD update option is given, RRDcollect uses internal librrd routines (the preferred mode of operation). If RRDcollect is not com- piled with librrd, then it will fall back to pipe-mode. Help and information -V --version Display RRDcollect's version, compile-time options and license. -h --help Show summary of options. --usage Show short usage information. FILES
/etc/rrdcollect.conf SEE ALSO
rrdcollect.conf(5), rrdtool(1), pcre(3) BUGS
Hopefully not many... AUTHOR
Dawid Kuroczko <qnex@knm.org.pl> Artur R. Czechowski <arturcz@hell.pl> 2 September 2002 RRDcollect 0.2.10 RRDCOLLECT(8)
All times are GMT -4. The time now is 01:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy