cdonawa@uvicctr.UVic.ca.UUCP (cdonawa) (07/21/89)
I am trying to time how long it takes NFS to transfer a file from a file server to a diskless workstation (this includes the time for me to run the transferred file if it is a binary). I am running benchmarks and need the time for different file server load factors. Originally I was going to write a small program that "started" my stopwatch, made a system call 'system("binary_to_execute")', wait for NFS to transfer the file to my workstation, and then stop the stopwatch when the binary stopped executing. However my stopwatch won't let me do this. I am currently using getrusage() as my stopwatch. It returns the user cpu time (among other things) since the last getrusage call. However, I want total elapsed time, not user cpu time. The difference is that getrusage() does not 'tick' while the program is blocked. My little program that calls system() is blocked until system() returns, but it is the time elapsed during the system() call that is most important to me. The closest I have come to a solution is to print out the time of day before and after running my program. But as one can imagine, the granularity of the results leaves something to be desired (accuracy is to the nearest second). I am using SunOS 4.0.1. Does anyone have any solutions or suggestions? Thank you in advance, Chris Donawa