The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem using sleep command lione.heart Shell Programming and Scripting 7 10-28-2007 04:06 AM
Sleep Command Glove Shell Programming and Scripting 1 10-03-2007 06:02 AM
sleep command leewar UNIX for Dummies Questions & Answers 3 09-11-2007 01:01 AM
passing parameters to sleep command nagaraju_svs UNIX for Dummies Questions & Answers 1 07-16-2003 10:17 AM
Sleep under one second Scoogie Shell Programming and Scripting 5 08-14-2002 09:10 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-04-2003
mattd
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
How can I get a command to sleep < 1 second?

I am running a number of processes through a kill -15 loop as a temporary fix to some viscious memory leaks. I cannot pass the entire list of processes through the kill at once, because the nature of the monitoring my client has will cause the software to failover.

Because of the large number of processes a

kill -15 $l
sleep 1

is still taking too long. How can I sleep for less than this?
  #2 (permalink)  
Old 08-04-2003
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Technically, sleep 0 is the answer although that is probably not what you are looking for.

I doubt the sleep is your real problem - you start the kill, and after it is done, you sleep for one second. You state "How can I get a command to sleep < 1 second" You can't. You can't get any command to sleep...you are not putting the command to sleep, you are putting your process to sleep for that amount of time. If you are looking to wait until the kill is completed, or looking to continue before it is completed, the sleep command is not what you want. The sleep command is to waste time until another check can be done while we are waiting for something to happen. If you need to wait less than a second, leave the sleep out.

Please give greater detail on what you are attempting to accomplish. And of course, your real fix is to get rid of the problem with memory, not write a script to kill off processes (IMO).
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0