Sponsored Content
Top Forums Shell Programming and Scripting Need to Speed up shell script Post 302988982 by rovf on Friday 6th of January 2017 03:42:35 AM
Old 01-06-2017
@MadeInGermany: You forgot the $1 and $2 in your GREP_LOGS (i.e. you pass the parameters, but you don't fetch them). Please update your posting accordingly.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

dmidecode, RAM speed = "Current Speed: Unknown"

Hello, I have a Supermicro server with a P4SCI mother board running Debian Sarge 3.1. This is the "dmidecode" output related to RAM info: RAM speed information is incomplete.. "Current Speed: Unknown", is there anyway/soft to get the speed of installed RAM modules? thanks!! Regards :)... (0 Replies)
Discussion started by: Santi
0 Replies

2. Shell Programming and Scripting

any way to speed up calculations in bash script

hi i have a script that is taking the difference of multiple columns in a file from a value from a single row..so far i have a loop to do that.. all the data is floating point..fin has the difference between array1 and array2..array1 has 700 x 300= 210000 values and array2 has 700 values.. ... (11 Replies)
Discussion started by: npatwardhan
11 Replies

3. Shell Programming and Scripting

Help to improve speed of text processing script

Hey together, You should know, that I'am relatively new to shell scripting, so my solution is probably a little awkward. Here is the script: #!/bin/bash live_dir=/var/lib/pokerhands/live for limit in `find $live_dir/ -type d | sed -e s#$live_dir/##`; do cat $live_dir/$limit/*... (19 Replies)
Discussion started by: lorus
19 Replies

4. Shell Programming and Scripting

Speed up this script!

I have a script that processes a fair amount of data -- say, 25-50 megs per run. I'd like ideas on speeding it up. The code is actually just a preprocessor -- I'm using another language to do the heavy lifting. But as it happens, the preprocessing takes much more time than the final processing... (3 Replies)
Discussion started by: CRGreathouse
3 Replies

5. Filesystems, Disks and Memory

data from blktrace: read speed V.S. write speed

I analysed disk performance with blktrace and get some data: read: 8,3 4 2141 2.882115217 3342 Q R 195732187 + 32 8,3 4 2142 2.882116411 3342 G R 195732187 + 32 8,3 4 2144 2.882117647 3342 I R 195732187 + 32 8,3 4 2145 ... (1 Reply)
Discussion started by: W.C.C
1 Replies

6. Shell Programming and Scripting

Any trick to speed up script?

Hi Guys, I have a script that I am using to convert some text files to xls files. I create multiple temp. files in the process of conversion. Other than reducing the temp. files, are there any general tricks to help speed up the script? I am running it in the bash shell. Thanks. (6 Replies)
Discussion started by: npatwardhan
6 Replies

7. Shell Programming and Scripting

Slow Perl script: how to speed up?

I had written a perl script to compare two files: new and master and get the output of the first file i.e. the first file: words that are not in the master file STRUCTURE OF THE TWO FILES The first file is a series of names ramesh sushil jonga sudesh lugdi whereas the second file (could be... (4 Replies)
Discussion started by: gimley
4 Replies

8. Shell Programming and Scripting

How can i speed this script up?

Hi, Im quite new to scripting and would like a bit of assistance with trying to speed up the following script. At the moment it is quite slow.... Any way to improve it? total=111120 while do total=`expr $total + 1` INCREMENT=$total firstline = "blablabla" secondline = "blablabla"... (5 Replies)
Discussion started by: brunlea
5 Replies

9. Shell Programming and Scripting

Help me with speed up this script

hey guys i have a perl script wich use to compare hashes but it tookes a long time to do that so i wich i will have the soulition to do it soo fast he is the code <redacted> (1 Reply)
Discussion started by: benga
1 Replies

10. Shell Programming and Scripting

Speed up the loop in shell script

Hi I have written a shell script which will test 300 to 500 IPs to find which are pinging and which are not pinging. the script which give output as 10.x.x.x is pining 10.x.x.x. is not pining - - - 10.x.x.x is pining like above. But, this script is taking... (6 Replies)
Discussion started by: kumar85shiv
6 Replies
RRDs(3) 						User Contributed Perl Documentation						   RRDs(3)

NAME
RRDs - Access RRDtool as a shared module SYNOPSIS
use RRDs; RRDs::error RRDs::last ... RRDs::info ... RRDs::create ... RRDs::update ... RRDs::updatev ... RRDs::graph ... RRDs::fetch ... RRDs::tune ... RRDs::times(start, end) RRDs::dump ... RRDs::restore ... RRDs::flushcached ... DESCRIPTION
Calling Sequence This module accesses RRDtool functionality directly from within Perl. The arguments to the functions listed in the SYNOPSIS are explained in the regular RRDtool documentation. The command line call rrdtool update mydemo.rrd --template in:out N:12:13 gets turned into RRDs::update ("mydemo.rrd", "--template", "in:out", "N:12:13"); Note that --template=in:out is also valid. The RRDs::times function takes two parameters: a "start" and "end" time. These should be specified in the AT-STYLE TIME SPECIFICATION format used by RRDtool. See the rrdfetch documentation for a detailed explanation on how to specify time. Error Handling The RRD functions will not abort your program even when they can not make sense out of the arguments you fed them. The function RRDs::error should be called to get the error status after each function call. If RRDs::error does not return anything then the previous function has completed its task successfully. use RRDs; RRDs::update ("mydemo.rrd","N:12:13"); my $ERR=RRDs::error; die "ERROR while updating mydemo.rrd: $ERR " if $ERR; Return Values The functions RRDs::last, RRDs::graph, RRDs::info, RRDs::fetch and RRDs::times return their findings. RRDs::last returns a single INTEGER representing the last update time. $lastupdate = RRDs::last ... RRDs::graph returns an ARRAY containing the x-size and y-size of the created image and a pointer to an array with the results of the PRINT arguments. ($result_arr,$xsize,$ysize) = RRDs::graph ... print "Imagesize: ${xsize}x${ysize} "; print "Averages: ", (join ", ", @$averages); RRDs::info returns a pointer to a hash. The keys of the hash represent the property names of the RRD and the values of the hash are the values of the properties. $hash = RRDs::info "example.rrd"; foreach my $key (keys %$hash){ print "$key = $$hash{$key} "; } RRDs::graphv takes the same parameters as RRDs::graph but it returns a pointer to hash. The hash returned contains meta information about the graph. Like its size as well as the position of the graph area on the image. When calling with and empty filename than the contents of the graph will be returned in the hash as well (key 'image'). RRDs::updatev also returns a pointer to hash. The keys of the hash are concatenated strings of a timestamp, RRA index, and data source name for each consolidated data point (CDP) written to disk as a result of the current update call. The hash values are CDP values. RRDs::fetch is the most complex of the pack regarding return values. There are 4 values. Two normal integers, a pointer to an array and a pointer to a array of pointers. my ($start,$step,$names,$data) = RRDs::fetch ... print "Start: ", scalar localtime($start), " ($start) "; print "Step size: $step seconds "; print "DS names: ", join (", ", @$names)." "; print "Data points: ", $#$data + 1, " "; print "Data: "; for my $line (@$data) { print " ", scalar localtime($start), " ($start) "; $start += $step; for my $val (@$line) { printf "%12.1f ", $val; } print " "; } RRDs::times returns two integers which are the number of seconds since epoch (1970-01-01) for the supplied "start" and "end" arguments, respectively. See the examples directory for more ways to use this extension. NOTE
If you are manipulating the TZ variable you should also call the POSIX function tzset(3) to initialize all internal state of the library for properly operating in the timezone of your choice. use POSIX qw(tzset); $ENV{TZ} = 'CET'; POSIX::tzset(); AUTHOR
Tobias Oetiker <tobi@oetiker.ch> perl v5.16.3 2014-06-10 RRDs(3)
All times are GMT -4. The time now is 07:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy