Total Time


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Total Time
# 15  
Old 06-01-2011
fantastic...that was so simple...i did it and got the out put at the end...
a slight confusion
i got 3 lines
real 7m17.844s
user 0m5.168s
sys 0m1.736s

what exactly are these and which one is my time for abc.ksh script....
# 16  
Old 06-01-2011
You may refer the man page of time.

real - starts counting from the moment you start the command to the command's termination, includes all scheduling delays, this would be your elapsed time.
user - how much time it has executed in used mode
sys - how much time in kernel mode
Code:
       o  The elapsed (real) time between invocation  of  utility
          and its termination.

       o  The User  CPU  time,  equivalent  to  the  sum  of  the
          tms_utime   and   tms_cutime  fields  returned  by  the
          times(2) function for the process in which  utility  is
          executed.

       o  The System CPU time,  equivalent  to  the  sum  of  the
          tms_stime and tms_cstime fields returned by the times()
          function for the process in which utility is executed.

# 17  
Old 06-01-2011
ok..thanks.Kumaran
One last thing...
if i need to display/print the time using echo or some other command after the completion of abc.ksh, how can it be done..
# 18  
Old 06-01-2011
rename your abc.ksh to abc_wrapped.ksh. and create new abc.ksh as below

Code:
#!/bin/ksh
echo `time .\abc_wrapped.ksh`

Make sure you put both the script in the same directory or change the path
# 19  
Old 06-01-2011
hmmm.
Cant i create a new abc_wrapped.ksh and put your code in that...
Why Renaming the name of my script.
# 20  
Old 06-01-2011
you can do either way. I just suggested my way. All you need a wrapper script which will have small code to print the time and will call your original script.
# 21  
Old 06-01-2011
so is this abc_wrapped.ksh or abc_wrapper.ksh
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Total size utilizes by the files older than a time span

Through find command I identified the files older that 1 year. I need the overall size utilizes by these 1 year older files. Please share me the command to identify it .Thanks Please post in an adequate technical forum! (3 Replies)
Discussion started by: Sang
3 Replies

2. Solaris

Total

i want to list Total HDD count in any soalris machine..can someone suggest some commands or combinations of commands (6 Replies)
Discussion started by: omkar.jadhav
6 Replies

3. UNIX for Dummies Questions & Answers

Dig total query time?

I'm using a .txt file filled with domain names for dig to use, the problem is that when i look at the results I get the query time for each individual query, I want to know how long it took in total for all queries to run, how can I achieve this? any help would be greatly appreciated, thank you.... (3 Replies)
Discussion started by: r7a7v7
3 Replies

4. Shell Programming and Scripting

Total time taken

Hi Friend, Need your help. I have a file which has information of start time and End time . I need to find how much time takes to complete the job . how can I do it in unix command . Example of Log file : Start Loading ---Thu Aug 2 17:14:09 EDT 2012 Load... (5 Replies)
Discussion started by: deep_kol
5 Replies

5. Shell Programming and Scripting

Help with sum total number of record and total number of record problem asking

Input file SFSQW 5192.56 HNRNPK 611.486 QEQW 1202.15 ASDR 568.627 QWET 6382.11 SFSQW 4386.3 HNRNPK 100 SFSQW 500 Desired output file SFSQW 10078.86 3 QWET 6382.11 1 QEQW 1202.15 1 HNRNPK 711.49 2 ASDR 568.63 1 The way I tried: (2 Replies)
Discussion started by: patrick87
2 Replies

6. Shell Programming and Scripting

How to get total time using awk

Hi guys, I can't find a solution to sum the h:m:s: columns. 28/05/2010 03h 29min 34seg ADSL TELEMAR 28/05/2010 12h 19min 21seg ADSL TELEMAR 29/05/2010 04h 20min 02seg ADSL TELEMAR 29/05/2010 04h 31min 45seg ADSL TELEMAR 30/05/2010 06h 10min 43seg ADSL TELEMAR Thanks Use code... (8 Replies)
Discussion started by: ashimada
8 Replies

7. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

8. UNIX for Dummies Questions & Answers

du total

Hi All Can anyone help me with the following du querry. I am trying to achieve a total size for all the zipped files in a directory. Using du -k *.gz gets me a file by file list but no handy total at the bottom. Thanks Ed (9 Replies)
Discussion started by: C3000
9 Replies

9. UNIX for Dummies Questions & Answers

grep running total/ final total across multiple files

Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Discussion started by: MrAd
5 Replies
Login or Register to Ask a Question