Finding cricket files and executing the rrdtool


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Finding cricket files and executing the rrdtool
# 1  
Old 11-20-2015
Finding cricket files and executing the rrdtool

hi

I am newbie to Unix and am trying to do some rrdtool searches. I am searching for all the rrd files which are in different directorys and then want to use uniq to sort them out. Once this is don't I wanted to echo the file name and append it to files before executing the rrdtool command to get the output. I am doing as below but it errors. Any advise how I Can achieve what I want to do?
  1. Find and sort all .rrd files which reside in multiple directory
  2. Input the filename for .rrd file in a output file rrdresults
  3. Execute rrdtool commands against the found
files and out rrdresults[/LIST]
Code:
A=1447200000
B=1447833600
for I in `find /var/cricket/data/*/system.rrd -ls | awk '{print $11}' | unique '; do
   echo $I\n >> /var/tmp/rrdresults | /opt/rrd/bin/rrdtool fetch $I MAX --start $A --end $B >> /var/tmp/rrdresults
done


Last edited by rbatte1; 11-23-2015 at 11:17 AM.. Reason: Converted to formatted number-list rather than text. Put code in CODE tags. Removed other formatting
# 2  
Old 11-25-2015
Hi chaps any help would be appriciated
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. 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

2. What is on Your Mind?

Place your bits - ICC World Cup Twenty20 (Cricket)

Who will win ICC World Cup Twenty20 These are the last four teams. Sri Lanka Pakistan Australia West Indies There is an open event in the Event Prediction Forum. The event closes on 6th October 2012. ICC World Cup Twenty20 (0 Replies)
Discussion started by: ni2
0 Replies

3. What is on Your Mind?

Cricket Anyone?

Hi, I was thinking of adding some Cricket Events. Just wanted to see if anyone would be interested in placing bits on Cricket Matches. If you are please share. I would like to know 1. What league or 2. Which matches or 3. Anything else you would place bits on. (0 Replies)
Discussion started by: ni2
0 Replies

4. Shell Programming and Scripting

Finding files with wc -l results = 1 then moving the files to another folder

Hi guys can you please help me with a script to find files with one row/1 line of content then move the file to another directory my script below runs but nothing happens to the files....Alternatively Ca I get a script to find the *.csv files with "wc -1" results = 1 then create a list of those... (5 Replies)
Discussion started by: Dj Moi
5 Replies

5. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

6. 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

7. Shell Programming and Scripting

finding duplicate files by size and finding pattern matching and its count

Hi, I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern. Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies

8. UNIX for Advanced & Expert Users

executing encrypted files

Hi, Is there a way of executing encrypted files? I have encrpyted files using vi and crypt, but when I execute the encrypted file, it takes the contents literally (special characters, junk - encrpyted format). Kind Regards, Kawah (4 Replies)
Discussion started by: Kawah Cheung
4 Replies

9. UNIX for Dummies Questions & Answers

executing encrypted files

Hi, Is there a way of executing encrypted files? I have encrpyted files using vi and crypt, but when I execute the encrypted file, it takes the contents literally (special characters, junk - encrpyted format). Kind Regards, Kawah (1 Reply)
Discussion started by: Kawah Cheung
1 Replies
Login or Register to Ask a Question