![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| To reduce execution time | Sreejith_VK | Shell Programming and Scripting | 4 | 05-13-2008 02:49 AM |
| Estimated execution time | Sreejith_VK | Shell Programming and Scripting | 4 | 04-16-2008 09:23 AM |
| specifying an execution time | VGR | UNIX for Advanced & Expert Users | 7 | 03-19-2008 05:32 AM |
| last execution time | cubs0729 | UNIX for Dummies Questions & Answers | 1 | 01-20-2006 08:45 PM |
| execution time | ramki_rk | High Level Programming | 2 | 08-27-2003 09:23 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How the time of execution could be checked?
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. Thank you. |
|
||||
|
I've checked time, timex, times even before posting the question and reviewed 'time' now.
As I understand I need in every comand in my screept add the time and get what: time of executing that one command? Or redirect the time's output somewhere, take the result and calculate a time from beginning of the script? Very uncomfortable! That not what I am looking for. I would assume to be able to put a line anywhere in script something like that: Code:
>... > echo "Processing time from beginning of the script="$(some_time_getting_util) |
|
||||
|
You simply pre-pend the "time" command to your script. When your script ends, the execution time, cpu time, etc will be printed to STDOUT...
> time yourscriptname your script's output.... real 0m0.005s user 0m0.010s sys 0m0.000s > The last 3 lines are the output of time command... Isn't that what you asked for? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|