Re: [Ilugc] to calculate time taken by process

2011-02-21 Thread Hrishikesh Murali
Hi,

On Mon, Feb 21, 2011 at 11:17 AM, narendra babu cnarendra_b...@yahoo.comwrote:

 is there anyway other time command to get the time taken by  each process
 to complete  .


Each of your insert statements sqlplus -s user1/pwdsafe runs as separate
processes by themselves. So when you use the 'time' command, it calculates
the time taken for that process to complete. Isn't it so?

i would like to know how can i get the total cpu time  taken to execute all
 the statements .


Use the time command for your entire shell script then! (Assuming your shell
script executes only these SQL commands). If not, then a naive workaround
would be to put these insert commands inside a separate script and run the
time command for that script from your original script. I don't know if time
command provides a mechanism to find the time of a set of commands, check it
out :-)

-- 
Thanks and Regards,
Hrishikesh Murali
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


[Ilugc] to calculate time taken by process

2011-02-20 Thread narendra babu

Hello all ,
 
I have a Linux shell script which has many sql statements which are doing 
insertion into database sequentially .
 
to make it parallel running process , i have put them as background process and 
to calculate time i have used time command .
 
i get the times of all the sql statements inside the shell script 
 
for example inside i have statements like below  to run sql insertions 
time  sqlplus -s user1/pwdsafe  @a20 
time  sqlplus -s user1/pwdsafe  @b20 
time  sqlplus -s user1/pwdsafe  @c20 
 
i am calculating time taken by each sql script by putting time command .
 
 
i would like to know how can i get the total cpu time  taken to execute all the 
statements .
 
is there anyway other time command to get the time taken by  each process to 
complete  .
 
 
Thanks in advance 
 
Thanks
Narendra

___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc