expert , alternative for sleep not use memory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting expert , alternative for sleep not use memory
# 8  
Old 10-09-2011
ok, as told before , after trying to ask or find alternative for sleep which use less memory without any succeed , i decided to delete sleep (or ping ,... ) and run script with while [1] (permanently) , now it doesn't use that 4.7 MEM% of sleep process so this is what i intended to do . (solved somehow with clear questions Smilie , but anyway sleep process not used my box memory anymore)
strange part is , probably use while [ 1 ] as permanently loop (which i couldn't see any new row's mem process for that) , use less memory than use while with sleep as top command confirmed!
Best Regards.

Last edited by pooyair; 10-09-2011 at 12:43 PM..
# 9  
Old 10-12-2011
Unfortunately that's very inefficient. You will waste a great deal of CPU time and perhaps power. If that's the only thing running on the system though, might be livable.

I continue to think most of that 5% is shared memory, hence not actually wasted. busybox is a big program, but loading it 5 times does not take 5 times the memory.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Alternative to Sleep?

Greetings. I've been wondering about this one for some time: Is there an alternative to sleep in bash? The reason: I'd like to simply limit the amount of processor usage in continuous while : script scenarios without spawning endless sleep processes as well. After beating the manpages, I... (14 Replies)
Discussion started by: LinQ
14 Replies

2. Solaris

Becoming a Solaris expert?

Hello everyone, how do you really study to become an expert in solaris OS? Thanks (3 Replies)
Discussion started by: cjashu
3 Replies

3. Shell Programming and Scripting

Expert cp command

How can I use the cp command to copy every file that I can find inside several folders cp -R *test* folder Supose there is ./122342343teste122343.txt ./bound/123teste1223453.txt ./feed/123teste1223453.txt and i want the files 122342343teste122343.txt, bound/123teste1223453.txt... (12 Replies)
Discussion started by: lipe.82
12 Replies

4. Shell Programming and Scripting

Wrapping 'sleep' with my 'resleep' function (Resettable sleep)

This is a very crude attempt in Bash at something that I needed but didn't seem to find in the 'sleep' command. However, I would like to be able to do it without the need for the temp file. Please go easy on me if this is already possible in some other way: How many times have you used the... (5 Replies)
Discussion started by: deckard
5 Replies

5. UNIX for Advanced & Expert Users

Expert Opinion

This perhaps does not belong in ths category; apologies, however, we have a heated debate going and your input will decide the result. Should UNIX (HP, AIX, etc) be rebooted following a monthly cycle (Every month, or a qtr, etc.). We have some UX admins (grumps) who say they have seen a UX... (6 Replies)
Discussion started by: rsheikh
6 Replies

6. Solaris

expert vi commands

:) Hi UNIX friends, Where do I get advanced vi commands to practice. Please Help Me. Love (4 Replies)
Discussion started by: Love
4 Replies
Login or Register to Ask a Question