Re: wraparound value for time
In the last episode (Mar 22), Chris Landauer said: i am running some very long programs, and it appears that time wraps around in its counting (the 72 cpu hour program did not wrap, the 164 cpu hour program did) Which value wrapped? user, system, or elapsed? i tried to figure out where the actual code for time is, but i can't quite tell - it appears to be buried inside csh somewhere (it also appears that there are several different possibilities for the data type used, depending on some compile time parameters for the csh compilation) The best I could come up with was that elapsed time might be stored in a long variable in milliseconds, which would wrap at 49.7 days. User and system times are stored as struct timevals and should never wrap. finally, can anybody tell me what the default tick size is? or better, where i can look to find out? sysctl kern.clockrate has that info. Hz defaults to 100, and tick is 100 / hz = 1. You can adjust Hz by setting kern.hz in /boot/loader.conf. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: wraparound value for time
On Mon, Mar 22, 2004 at 03:40:58PM -0800, Chris Landauer wrote: i tried to figure out where the actual code for time is, but i can't quite tell - it appears to be buried inside csh somewhere (it also appears that there are several different possibilities for the data type used, depending on some compile time parameters for the csh compilation) There's also a standalone time(1) command which does much the same as the shell built-in 'time' but has completely different internals. % time date Tue Mar 23 17:32:39 GMT 2004 0.000u 0.003s 0:00.02 0.0% 0+0k 1+0io 5pf+0w % /usr/bin/time -h date Tue Mar 23 17:33:44 GMT 2004 0.00s real 0.00s user 0.00s sys As you can see, the resolution is lower than the builtin. With any luck the internal representation will be different and so the supported range of values may be larger. You can get hold of the other usage information for the process by adding a '-l' flag. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: wraparound value for time
On Tue, 23 Mar 2004 17:38:02 + Matthew Seaman [EMAIL PROTECTED] wrote: On Mon, Mar 22, 2004 at 03:40:58PM -0800, Chris Landauer wrote: i tried to figure out where the actual code for time is, but i can't quite tell - it appears to be buried inside csh somewhere (it also appears that there are several different possibilities for the data type used, depending on some compile time parameters for the csh compilation) There's also a standalone time(1) command which does much the same as the shell built-in 'time' but has completely different internals. [...] With any luck the internal representation will be different and so the supported range of values may be larger. Yep, I just checked the source, and time(1) does use struct timeval's internally. Should be sufficient to time something running for several decades. -Chris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
wraparound value for time
hihi, all - i am running some very long programs, and it appears that time wraps around in its counting (the 72 cpu hour program did not wrap, the 164 cpu hour program did) i am running 5.1 with the GENERIC kernel, and using /bin/csh with 'time pgm' (i also tried SuSe Linux 9.0, but i had to change away from it because it would crash the machine after some dozens of hours - but i normally run FreeBSD anyway, which has not crashed even for 3 cpu week runs) i found no hint about the maximum possible counted time in the manuals for any of the likely candidates i tried to figure out where the actual code for time is, but i can't quite tell - it appears to be buried inside csh somewhere (it also appears that there are several different possibilities for the data type used, depending on some compile time parameters for the csh compilation) finally, can anybody tell me what the default tick size is? or better, where i can look to find out? more soon, cal Dr. Christopher Landauer Aerospace Integration Science Center The Aerospace Corporation [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]