Raised This Month: $ Target: $400
 0% 

linux ubuntu cron job


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SCHWEDEN
Member
Join Date: Dec 2007
Location: 127.0.0.1
Old 04-16-2008 , 08:16   linux ubuntu cron job
Reply With Quote #1

Hey guys, sorry for using amxx forums for this but u seem to have the answer for everything so ill just give it a shot

Im running 4 cs-servers on ubuntu server edition 7.10 (intel duo core) and i was told to set affinity for the processes and to nice/renice them. Ok this was no problem until the servers sometimes crash due to bugs in the plugins i use. This happens a few times per day and it doesnt bother me too much BUT it does bother me that they lose their nice level and affinity setting (it's being resetted).

So, PardonMe (a user here on the forums) told me to do cron jobs but i cant figure out how I would do this.

https://help.ubuntu.com/community/CronHowto

Here is the howto...plz help me make a cron job that sets nice level and affinity for a program instead of a process id. Im quite new to linux, call me lazy but i tried a lot.

The commands i use now are:

sudo schedtool -a "cpu-core" "processid"
sudo renice -20 "processid"

Do i need to nice it first?

Conclusion: How do I make a cron job that executes these commands on programs and not on process ids, lets say, every hour?


PS. When starting hlds, i run "./hlds_run" but when watching the processes in taskmanager, the process "hlds_i686" is the one working and "hlds_run" is at sleep.

much love
__________________


Last edited by SCHWEDEN; 04-16-2008 at 08:36. Reason: misspell
SCHWEDEN is offline
Send a message via MSN to SCHWEDEN
 



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

Forum Jump


All times are GMT -4. The time now is 02:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode