abdul202 Posted April 16, 2013 Share Posted April 16, 2013 i have a script that i use to upload files to file sharing website, recently i got a notice from my hosting provider about the cpu resources the script use about 90% of the cpu the problem is in the following code which consume alot of cpu exec ('' . $php_path . ' -c ' . $config_ini . ' mirrors/rapidshare.php ' . $file_uid . ' ' . $status . ' >/dev/null &'); i use the function exec for processing the code i want to find away to limit the cpu usage for the script best rgards Quote Link to comment Share on other sites More sharing options...
trq Posted April 16, 2013 Share Posted April 16, 2013 See: http://linux.die.net/man/1/nice Quote Link to comment Share on other sites More sharing options...
abdul202 Posted April 17, 2013 Author Share Posted April 17, 2013 See: http://linux.die.net/man/1/nice Thank you trq this is what i was looking for i found the following tutorial is helpful too on the subject http://www.nixtutor.com/linux/changing-priority-on-linux-processes/ best regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.