On Thu, Oct 03, 2002 at 10:10:34AM -0700, Jessee Parker wrote: > At the top of the loop, I check the system uptime to get the load average > so I can have the program sleep for 5 seconds to let things stabilize a > bit.
I suspect an easier way of doing this would be to nice yourself down really low; see man nice. There may be a Perl module available on CPAN for doing this, as well. > When this happens, the message "Sleeping" is printed out to a log file. > However, I noticed that the program ended up sleeping without printing the > message. It sounds to me like you might be having a buffering issue; while the process did print before going to sleep, the output was never flushed to the file. See http://perl.plover.com/FAQs/Buffering.html. > The condition I set for load average was never reached so there was no > reason for it to sleep. I ran a netstat -an and there were alot of tcp > connections to port 25 in the TIME_WAIT mode. How did you verify the condition was never reached? If you determined it independently of the program printing to its log file then I'd have to see the code to be able to tell you what's going on. > What I'm trying to figure out is if the OS or Perl itself puts a limit on > processes when it has a large number of connections in that mode forcing > it to sleep. I am running this on Redhat Linux version 7.3. Unix operating systems do have methods of limiting the number of open file descriptors for a given process, as well as system-wide. However, the typical response when you reach this limit is to kill the offending process, not to put it to sleep. This is how Linux process limits operate. Perl doesn't impose limits on resource usage. Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]