Sponsored Content
Top Forums Shell Programming and Scripting using Perl with rrdtool to create and update graphs Post 302425739 by durden_tyler on Saturday 29th of May 2010 02:01:51 PM
Old 05-29-2010
Quote:
Originally Posted by jeffersno1
...
i want to create an .RRD for each pass so im trying to put this into a for loop:

so in princible i should be able to do the following, but the .rrd's dont get created ????

Am i doing something fundamentially wrong here ?

Code:
foreach $key ($key) { 
  
  # if rrdtool database doesn't exist, create it 
LINE 52        if (! -e "$rrd/$key.rrd") 
        { 
                print "creating rrd database for $key ...\n"; 
                RRDs::create "$rrd/$key.rrd", 
                        "-s 300", 
                        "DS:pass:DERIVE:600:U:U", 
                        "RRA:AVERAGE:0.5:1:576", 
                        "RRA:AVERAGE:0.5:6:672", 
                        "RRA:AVERAGE:0.5:24:732", 
                        "RRA:AVERAGE:0.5:144:1460"; 
        }

...
The text in bold, red should be an array and not a scalar.

Maybe you intended to use: keys %resultsHash ?

tyler_durden
 

9 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

how to create a logfile in unix after insert/update/delete from informix

I am running a Informix-4GL program to insert/update/delete on a particular table (say xxx). Now I want to create a logfile in unix which will store the affected data(say xxx.*) along with user information (say uname,IP address etc.) what command I should use from Informix-4GL ? I have tried the... (0 Replies)
Discussion started by: subhamukh
0 Replies

2. UNIX for Dummies Questions & Answers

linux rrdtool help create graph

I need some help with creating graphs using the rrdtool. I have never used it before. I installed by yum install rrdtool. Basically I have a txt file with these values 432 542 234 531 1004 Does anyone know the syntax of rrdtool to automatically take the values from the txt file and... (1 Reply)
Discussion started by: borderblaster
1 Replies

3. Shell Programming and Scripting

Command to create and update csv file

Hi, I need to create a csv file to store oracle query output. This report need to be created on hourly basis. The csv file report format as "Report_22_Sep_09_13IST.csv". I have the oracle query. Now i need to create and move the oracle query output to the report row by row starting from 3rd row.... (6 Replies)
Discussion started by: Sekar1
6 Replies

4. Shell Programming and Scripting

Perl module script to draw speedometer/gauge graphs

Hi, Has anyone used any perl modules to draw dashboard/gauge graphs similar to a speedometer? I am looking to create some graphs in perl. Please share your thoughts if there are any modules and an example script. Thanks (0 Replies)
Discussion started by: devtakh
0 Replies

5. Red Hat

Create driver update disc for redhat

Hi, I am trying to install redhat into one of my machine, but during boot up from Redhat Dvd, it mention not able to detect my HDD and it need another driver to install into it. Because the machine only have one driver update disc source which is my CD/DVD rom, so i would like to know... (9 Replies)
Discussion started by: cbtang
9 Replies

6. UNIX for Advanced & Expert Users

perl and HP-UX : instmodsh in combination with software depot : update inventory for installed Perl

we create a HP-UX software depot with a new perl-modul. after installation of the software depot, the perl module i can't find with instmodsh in the inventory for installed Perl modules. - i have learned of using instmodsh command : i find out what modules are already installed on my system. ... (0 Replies)
Discussion started by: bora99
0 Replies

7. Shell Programming and Scripting

Can't get While loop working with rrdtool update

I have data in a CSV file that looks like; 1353557880:1.111:123.3 1353557940:1.113:123.3 1353558000:1.118:123.3 1353558060:1.123:123.3 1353558120:1.218:123.3 I'm running the following; while IFS=":" read d a b; do rrdtool update temp.rrd $d:$a:$b; done <temp6 It gives me the following... (2 Replies)
Discussion started by: ottsm
2 Replies

8. Shell Programming and Scripting

Create a specific bash to increase the automatic update on my pi

hi everyone, I just began to be interested about the bash access. I buy a time ago a Raspberry pi, I installed raspbmc and now I would like build a bash to copy everyday all new files inside my server directly on the hard drive in my Pi. So my HDD is directly plug on my pi with usb connect,... (4 Replies)
Discussion started by: nagito34
4 Replies

9. Shell Programming and Scripting

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 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)
Discussion started by: kaf3773
1 Replies
MRTG-RRD(1)							       mrtg							       MRTG-RRD(1)

NAME
mrtg-rrd - How to use RRDtool with MRTG SYNOPSIS
After using MRTG for some time you may find some limitations, mostly in the areas of performance and graphing flexibility. These are exactly the areas addressed by RRDtool. To learn more about RRDtool check out its website on http://oss.oetiker.ch/rrdtool RRDTOOL INTEGRATION
When using mrtg with RRDtool you are replacing rateup with the RRDtool perl module RRDs.pm. To enable RRDtool support in mrtg you have to add the line LogFormat: rrdtool to your mrtg config file. MRTG needs access to both the RRDtool perl module RRDs.pm and to the rrdtool executable. If these two items are not installed in locations where perl can find them on its own, then you can use the following two parameters to supply the appropriate directories. For the location of the rrdtool executable you put PathAdd: /usr/local/rrdtool/bin/ or PathAdd: c: rdtoolin For the location of the perl module it would be: LibAdd: /usr/local/rrdtool/lib/perl/ or LibAdd: c: rdtoolinlibperl When you have made this modification to the configuration file, several things will happen when you run mrtg again with the new config file: 1. mrtg will take all your old ".log" files and convert them to ".rrd" format. (The ".log" files don't get touched in the process, so if things don't work out they are still there.) 2. mrtg will use rrdtool to update its databases. These will have a new format called rrd which is totally different than the native log format of the classic mrtg. 3. mrtg will not create any webpages of graphs anymore. It will only query the routers for traffic information and update its rrd data- bases. The advantage of whole thing is that the mrtg will become much faster. Expect the runtime to drop to 20% of the previous value. (I would like to get some feedback on this from folks with large installations.) Mind you, though, while the logging process of RRDtool is very fast, you are also gaining some time by neither creating graphs nor updating webpages. The idea behind this is that it is more efficient to create graphs and webpages on demand by using a cgi script. At the moment there is no official script to do this, but two contributers have created such scripts: One4All aka 14all.cgi This was the first program to take over the webpage creation and graphing task. It has been developed by Rainer Bawidamann rainer.baw- idamann@web.de. You can find a copy on Rainers website: http://my14all.sourceforge.net/ The program comes with its own documentation routers.cgi, servers.cgi and generic.cgi These are other cgi frontends to mrtg running with rrdtool. The main difference between this and 14all is that the web pages it creates are much more stylish than the ones from mrtg. These tools have been written by Steve Shipway steve@steveshipway.org. You can find a copy in http://www.steveshipway.org/software/ The programs come with their own installation instructions. mrtg-rrd The mrtg-rrd script is a CGI/FastCGI application by Jan "Yenya" Kasprzak for displaying MRTG graphs from data in the RRDtool format. It is an intended replacement for the 14all.cgi script. It can make your monitoring system faster because MRTG does not have to generate all the PNG files with graphs every 5 minutes or so. Instead of this the graphs are generated on-demand when the user wants to see them. http://www.fi.muni.cz/~kas/mrtg-rrd/ Paul C. Williamson has written a more in-depth page on how the whole process works, including some performance figures. You can find his page on http://www.geocities.com/paulcwilliamson/mrtg/rateup2rrd.html FUTURE
Just as a side note: MRTG-3 will be based entirely on rrdtool technology. But don't wait for it ... get going now! AUTHOR
Tobias Oetiker <tobi@oetiker.ch> 2.16.2 2008-05-16 MRTG-RRD(1)
All times are GMT -4. The time now is 10:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy