Sponsored Content
Full Discussion: Shell Script average runtime
Homework and Emergencies Homework & Coursework Questions Shell Script average runtime Post 302563922 by navlelo on Wednesday 12th of October 2011 11:58:19 AM
Old 10-12-2011
well with that format I print 0:00.00elapsed , asuming minutes:seconds.tenth of a second. I'd be interested in adding up all the seconds.tenths of seconds during the loop, then averaging by dividing on number of runs. supposed to run it 100 times, but my test code runs 5 for simplicity till I get it going.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

korn shell version at runtime?

How can I check what kornshell version I am using at runtime from within a kornshell script? (3 Replies)
Discussion started by: qanda
3 Replies

2. Shell Programming and Scripting

pass runtime parm to at -f shell script

Hi Folks... I am using a ksh script to submit the at command to run a shell script for immediate execution. The shell script requries 1 parameter. Command in the script is at -m -f $EXE_DIR/process_server.sh $START_TIME $DB_NAME where START_TIME=now and DB_NAME= tnsname of Oracle... (1 Reply)
Discussion started by: island360
1 Replies

3. AIX

allocate memory for shell script at runtime during execution--urgent critical help!!

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (1 Reply)
Discussion started by: aixjadoo
1 Replies

4. UNIX for Dummies Questions & Answers

allocate memory for a shell script at runtime--urgent critical help!!!

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (3 Replies)
Discussion started by: aixjadoo
3 Replies

5. UNIX for Advanced & Expert Users

Allocate memory for a shell script in Aix at runtime-urgent critical

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (1 Reply)
Discussion started by: aixjadoo
1 Replies

6. Shell Programming and Scripting

passing runtime arguments to a shell script...

hi I am new to shell programming.....my question is while running one of my shell program it stops in between to accept input from the user and proceeds furthur after giving input....I want to know whether I can set this input through some files so that the shell acript reads the input from the... (10 Replies)
Discussion started by: santy
10 Replies

7. Shell Programming and Scripting

Shell Runtime Statistics

Hi, I am trying to capture runtime stats of a shell script (c shell). Are there system variables to call? Or should I create a date variable at the start of the script and at the end of the script? I am trying to capture the time if the script stops or ends with error. Please help. ... (4 Replies)
Discussion started by: CKT_newbie88
4 Replies

8. Shell Programming and Scripting

shell script for finding average runtime of other script

so I've made a shell script that downloads 6 files in succession from a given url, then deletes them. Now I want to time the script, and the average time it uses by running it ~100 times. My problem is tho, how do I store the time it takes for each run through of the script? I know time writes to... (3 Replies)
Discussion started by: navlelo
3 Replies

9. Shell Programming and Scripting

Shell or awk script to compute average of all the points within a circle

HI Help, I have a file which looks like below --- Input file ---> 1970113.00000 3460.00000 1.09516 1970116.00000 3791.00000 1.06350 1970120.00000 4120.00000 1.07588 1970115.00000 4450.00000 1.09591 1970116.00000 4780.00000 1.09965 1970120.00000 5109.00000 1.06733 ... (7 Replies)
Discussion started by: Indra2011
7 Replies

10. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
tryto(1)						      General Commands Manual							  tryto(1)

NAME
tryto - tries to run a command limited by a timeout or number of tries, can be used to run as svlogd(8) processor. SYNOPSIS
tryto [-pPv] [-t sec] [-k ksec] [-n tries] prog DESCRIPTION
prog consist of one or more arguments. tryto runs and watches prog, feeding its standard input to prog's standard input. If prog exits with a return code other then 0, tryto runs prog again after sleeping one second. If the number of retries reaches the maximal number of tries, tryto prints an error message and gives up. If the timeout sec seconds is reached and prog is still running, tryto sends a TERM signal to prog, waits ksec seconds for prog to termi- nate, then sends a KILL signal if prog still is there, and exits as soon as possible. OPTIONS
-t sec timeout. Set the timeout to send TERM to prog to sec seconds. Default is 180. -k ksec kill timeout. Set the timeout to send KILL to prog to ksec seconds. Default is 5. -n tries Set the maximal number of tries to tries. If prog exited with a return code other that 0, tryto tries to rewind standard input to the beginning using lseek(2) before starting prog again. Default is 5. -p processor. Use this option if you run tryto as a svlogd(8) processor (see below). -P process group. Run prog in a new session and process group, and send signals on timeout to prog's process group instead of its pid. -v verbose. Print verbose messages to standard error. PROCESSOR
If tryto sees the -p option, tryto runs as a svlogd(8) or multilog(8) processor, making use of filedescriptors 4 and 5: Before starting prog, tryto moves the filedescriptor 5 to 2, so all error messages from tryto and prog will be saved in svlogd(8)'s state to be processed on the next run of tryto -p. After starting prog, tryto first feeds all data it reads from filedescriptor 4 into prog's standard input, then all data from filedescrip- tor 0. If prog fails by timeout sec seconds or maximal number of tries, tryto prints all data from standard input to standard output, an error message to standard error, and exits with 0. EXIT CODES
If tryto itself fails, it returns 111. If tryto runs as a svlogd(8) processor, tryto returns 0 in all other cases. If prog was run successfully, tryto returns 0. If prog failed by timeout, tryto returns 100. If prog failed by maximal number of tries, tryto returns the last return code from prog. SEE ALSO
socklog(8), uncat(1), svlogd(8), multilog(8), lseek(2) http://smarden.org/socklog/ http://smarden.org/runit/ AUTHOR
Gerrit Pape <pape@smarden.org> tryto(1)
All times are GMT -4. The time now is 03:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy