recording the time it takes to execute a program

recording the time it takes to execute a program

Post by Massimo Pint » Fri, 03 Aug 2001 04:09:44



Hi, I am using the GNU bash shell 2.04.11 in Linux. I need to track the time
it takes to execute a MonteCarlo program, in order to have an idea of how
long would it take to make a longer run.

Unfortunately I don't have a bash manual handy, so I ask the newsgroup.
Presumably I should record the time at the beginning and the end of the
program execution, calculate the difference, finally translating into a
human readable format as hours an minutes.

Thanks in advance

Massimo Pinto

---
Massimo Pinto
Ph.D. Student
Gray Cancer Institute
http://www.gci.ac.uk/usr/pinto

 
 
 

recording the time it takes to execute a program

Post by Chris F.A. Johnso » Fri, 03 Aug 2001 04:22:33



> Hi, I am using the GNU bash shell 2.04.11 in Linux. I need to track the time
> it takes to execute a MonteCarlo program, in order to have an idea of how
> long would it take to make a longer run.

> Unfortunately I don't have a bash manual handy, so I ask the newsgroup.
> Presumably I should record the time at the beginning and the end of the
> program execution, calculate the difference, finally translating into a
> human readable format as hours an minutes.

man time

e.g.:
        time your_command_goes here

--
    Chris F.A. Johnson                        http://cfaj.freeshell.org
    ===================================================================
    My code (if any) in this post is copyright 2001, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License

 
 
 

1. netstat -p command takes a really long time to execute

I'm dong an arp -a, or netstat -p, and its taking a really long time
to finish on one our boxes, a solaris 7 ultra-5.  It works fine on
the other solaris boxes here.  I do a truss on the command, a see
that its sleeping after listing one entry in the arp table.  Than after some
time, it lists another line in the table, and goes back to sleep.  This
keeps going on til the entire arp table is listed.  It takes about 100 seconds
to complete and there are only 8 entries in the arp table!!

The same situation when I do a netstat -a.  But if I do a netstat -an
it works fine.  So I'm quite puzzled here.  The reason I ask is that I think
this has something to do when I first telnet onto the box - it takes an
awfully long time for the login prompt to come, but after that everything is
okay.  This only occurs on this box, whereas I can telnet to the other boxes
fine.  All the boxes are on the SAME hub/switch.  Any ideas anyone????

2. problems with a QUANTUM BIGFOOT_CY6480A

3. How to find out time taken by different routines of a C program

4. lpd error message after upgrading to 2.0.29

5. Finding CPU time taken by portion of program

6. crash with 2.1.95 SMP

7. having programs execute at login time

8. Any idea how to make a Lexmark1100 work?

9. Can two programs record from /dev/dsp at the same time?

10. Measure the time a program needs to execute

11. [Fwd: Re: Help: recv takes a long time to time out!]

12. Help: recv takes a long time to time out!

13. Executing another program from C program