Sponsored Content
Top Forums Shell Programming and Scripting AWK script to detect webpages from file Post 302406544 by ROFL on Tuesday 23rd of March 2010 08:22:34 AM
Old 03-23-2010
I managed to fix it before your post, but thanks anyway, it's a much shorter solution.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix script to detect new file entry in directory

Hi All, I want to detect each new file coming / getting created in unix directory. When every new file came to directory, i have to get its details like its size , date and time stamp and store it into another file. Could any one please tell me , how i can achieve that? Thanks. (13 Replies)
Discussion started by: james_1984
13 Replies

2. UNIX for Dummies Questions & Answers

how to detect my script is already running

I have a script which must not be run more than once at any given time. THis script will be scheduled to run every 20 mins as a cron job. In my script can i have logic to say if this script is already running from the previous cron, then exit. How do i go about doing that. If you describe the... (11 Replies)
Discussion started by: rmulchandani
11 Replies

3. Shell Programming and Scripting

AWK script to detect webpages from file

Hi guys I'm very new to unix and I have to create an awk script that detects webpage addresses from a file/webpage and outputs how many times each webpage was detected.e.g. if my file was: (Note: The symbol " was added to stop them being created into links) "www.google.com"... (1 Reply)
Discussion started by: ROFL
1 Replies

4. Shell Programming and Scripting

script to detect a file from inserted usb and puts into a Variable

There is a same named log file that I have on my 2 different android phones. When I plug it into my computer, it appears in the media folder, For example the first android phone: /media/F6BA-0AF5/folder/A.log I want to put that into a variable to be manipulated.... (3 Replies)
Discussion started by: tobenguyen
3 Replies

5. Shell Programming and Scripting

Script to detect dynamic ip change and update to config file

Hi All, I am newbie here and request your assistance. I have a service running on public ip, but since I have a dynamic IP it keeps on changing and every time I need to manually get the new ip and add to the config file and restart the service. This has become bit time consuming. Hence, I... (4 Replies)
Discussion started by: Shaan_Shaan
4 Replies

6. Shell Programming and Scripting

How to detect empty field in awk ?

Hi ! programmers I have a need of detecting empty field in file my file looks like this 40.900|-71.600|1.6|20|1|1961|21.00|3.700||1|US|28035|10029370|31 40.900|-71.600|5.7|20|1|1961|21.00|3.700||1|US|28035|10029370|31 40.900|-71.600|7.8|20|1|1961|21.00|3.700||1|US|28035|10029370|31... (7 Replies)
Discussion started by: Dona Clara
7 Replies

7. Shell Programming and Scripting

Help with detect with regex and move script

Hi all, I am needing some help with a script that will search for a video file by known extensions and then do a pattern search (I'm guessing via regex) and then based on a match of one type of another move the file to an assigned directory. I would like to do this with either a shell script... (7 Replies)
Discussion started by: Simplify
7 Replies

8. Shell Programming and Scripting

How to detect awk and nawk?

I have 10 scripts which use awk/nawk extensively. I have to always change awk to nawk and nawk to awk when i deploy all my scripts to different types of servers as some support nawk while other support awk. Can you propose a solution that without having to tweak my 10 scripts at several... (8 Replies)
Discussion started by: mohtashims
8 Replies

9. Shell Programming and Scripting

awk script to detect specific string in a log file and count it

Hello, can someone guide me on this? I don't know what is the best approach, (awk script, shell script) I am using RedHat Linux version 6.5. There is a third party application deployed on that server. This app by default generates 5 log files and each file is 20MB. These log rollover... (5 Replies)
Discussion started by: ktisbest
5 Replies

10. Shell Programming and Scripting

How to detect url in use in a script?

Hello, I have a small script and it runs from web application in below format: pipe:///path_to_myscript.sh url1 url2 url3 myscript.sh: #!/bin/bash count=0 while do count=$((count+1)) exec 3>&1 ((ffmpeg -i $1 ...... -f mpegts pipe:1 2>/dev/null 1>&3 ) 2>&1 | \ while read LINE; do echo... (9 Replies)
Discussion started by: baris35
9 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:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy