10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Guys,
I would like to know is there a way to take the script execution time
For e.g i am having a script.sh i need to write inside he script.sh like
Start time : 10-Mar-2016 02:30:35
all code over here
...
End time : 10-Mar-2016 03:30:32
Script start time - 02:30:35 ... (7 Replies)
Discussion started by: Master_Mind
7 Replies
2. UNIX for Dummies Questions & Answers
how much time a particular command or shell script executed
there is any command to know this
thanks (5 Replies)
Discussion started by: tsurendra
5 Replies
3. Shell Programming and Scripting
Hello,
I am on solaris 9 (KSH). I need to get the execution time of my script. I can't use the time command as I have to send by mail the result in a human readable way.
So I am looking for a code to add to my script.
The output result would be :
Execution time :... (1 Reply)
Discussion started by: Aswex
1 Replies
4. Shell Programming and Scripting
Hi,
I have a simple question. How can I get the execution time of a script and maybe put it in a variable?
Another question. How can I get only time and not date and put it in a variable? I tried something with "date" command but with no success...
If someone could help me... (8 Replies)
Discussion started by: Moumou
8 Replies
5. Shell Programming and Scripting
I need to see how much time my script uses to execute different part of processing.
Is there anything to get it?
I see the shell biultin variable $SECONDS, but I need much more precise statistic, in mili or micro seconds.
Is there anything available for that?
I use bash shell.
... (4 Replies)
Discussion started by: alex_5161
4 Replies
6. Shell Programming and Scripting
Hi all,
I want to display a progressbar depending upon the completion status of a command. I am coding from scratch as I dont want to use in place code. so Is there anyway of getting the progress of a command in percentage or in any other units while its running , is it possible using the top... (5 Replies)
Discussion started by: hashin_p
5 Replies
7. Shell Programming and Scripting
Hi All,
The below script I run daily and it consumes 2 hours approx.
In this I am calling another script and executing the same twice.
Is the loop below the cause for the slow process?Is it possible to finetune the program so that it runs in a much faster way?
The first script:
#!/bin/ksh... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies
8. Shell Programming and Scripting
Hi All,
One of my script runs (approximately) for 20 to 40 hours
Is there any way in unix to find the estimated time required for a shell script(Cron job).ie to find the time required for execution even before the script is executed.
Any discussion(pointers) regarding the same is most welcome. (4 Replies)
Discussion started by: Sreejith_VK
4 Replies
9. UNIX for Dummies Questions & Answers
is there a command in Solaris 8 that will show a particular scripts last execution time? (1 Reply)
Discussion started by: cubs0729
1 Replies
10. Programming
hi ,
i ve coded a C program
in that im using malloc dynamically ,
it is being called many times in the program
The program is to simulate jobs in manufacturing system.
the execution time is increasing drastically as the number of jobs are increased.
could any body tel what may be the problem... (2 Replies)
Discussion started by: ramki_rk
2 Replies
usleep(2) System Calls Manual usleep(2)
NAME
usleep - suspend execution for an interval
SYNOPSIS
DESCRIPTION
The function will cause the calling thread to be suspended from execution until either the number of real-time microseconds specified by
the argument useconds has elapsed, or a signal is delivered to the calling thread and its action is to invoke a signal-catching function or
to terminate the process.
The suspension time may be longer than requested due to the scheduling of other activities by the system, or because of the time spent in
processing the call.
The useconds argument must be less than 1,000,000. If the value of useconds is 0, then the call has no effect.
If a signal is generated for the calling process during execution of and if the signal is being ignored or blocked from delivery, it is
unspecified whether returns when the signal is scheduled; if the signal is being blocked, it is also unspecified whether it remains pending
after returns or it is discarded.
If a signal is generated for the calling process during execution of except as a result of a prior call to and if the signal is not being
ignored or blocked from delivery, it is unspecified whether that signal has any effect other than causing to return.
If a signal-catching function interrupts and examines or changes either the time a is scheduled to be generated, the action associated with
the signal, or whether the signal is blocked from delivery, the results are unspecified.
If a signal-catching function interrupts and calls or to restore an environment saved prior to the call, the action associated with the
signal and the time at which a signal is scheduled to be generated are unspecified, it is also unspecified whether the signal is blocked,
unless the process's signal mask is restored as part of the environment.
Implementations may place limitations on the granularity of timer values. For each interval timer, if the requested timer value requires a
finer granularity than the implementation supports, the actual timer value will be rounded up to the next supported value.
Interactions between and any of the following are unspecified:
RETURN VALUE
On successful completion, returns 0. Otherwise, it returns -1 and sets to indicate the error.
ERRORS
The function may fail if:
[EINVAL] The time interval specified 1,000,000 or more microseconds.
APPLICATION USAGE
The function is included for its historical usage. The function is preferred over this function. Multi-threaded applications are recom-
mended to use instead of is also a thread canceling point.
SEE ALSO
alarm(2), getitimer(2), nanosleep(2), sigaction(2), sleep(3C), timer_create(2), timer_delete(2), timer_getoverrun(2), timer_gettime(2),
timer_settime(2), <unistd.h>.
CHANGE HISTORY
First released in Issue 4, Version 2.
usleep(2)