> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:hlds_linux- > [EMAIL PROTECTED] On Behalf Of LouLou Bizou > Sent: Wednesday, November 07, 2007 3:14 AM > To: [email protected] > Subject: Re: [hlds_linux] CS:Source Linux PID's Changing > > -- > [ Picked text/plain from multipart/alternative ] > you need to use taskset for cpu affinity ! > > it require PID, you can maade a shell script with crontab that for example > chek CPU afficinty for PID every 5 minutes > > I have done it for my box and thats work well ! > > 2007/11/7, Matt Ogborne <[EMAIL PROTECTED]>: > > > > -- > > [ Picked text/plain from multipart/alternative ] > > Howdy, > > > > Long time reader, first post, so pls be gentle :-) > > > > Until recently the PID (process ID) for a CS:S server running used to > stay > > the same, thus using taskset in Linux, we were able to set the process > to > > run on a specific CPU core. > > > > However recently (about ~3-4weeks ago) the PID randomly changes, as in > > when > > the game server is started its say PID 4223, go back to it a day later > and > > its then 5823, go back a day later again and its a different PID. > > > > This is kinda of annoying now, as with quad core CPU's coming down in > > price, > > the ability to fix a process (a game server or servers) to specific > cores > > is > > very handy indeed. > > > > Any ideas on how to stop it jumping PID's?? > > > > BTW: Linux Ver: Ubuntu 6.06 and its run in a screen session. > > > > Kind regards, > > > > Matt AKA Team MX | MoggieX > > -- > > > > _______________________________________________ > > To unsubscribe, edit your list preferences, or view the list archives, > > please visit: > > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > > > -- > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds_linux
I don't understand completely how this process is set up. Do you have an automatic restart set up through a script to have the server restart on a daily, or other increment? I know my servers are set up in cron to restart each day at 5 am and the easiest way to pull the PID is to do: [EMAIL PROTECTED]: ps -ef | grep screen | grep "whatever you title your screen session as" | grep -v grep | awk '(print $2 )' > counterstrike.pid ps -ef pulls all running processes, the pipe means we are going to do something with that command, the next thing we do is grep for screen sessions, then we grep for the screen session that you saved the game as, then grep -v removes the grep that we are doing at the moment, and finally the awk command will take the second piece of output (which is the PID), and prints it out - this will give you the PID for the screen session. If you want you can roll that all up in a script, chmod it so that it can be run executably, and then through it in your crontab to run hourly, daily, etc. Keep us updated on how it goes. ; ) CONFIDENTIALITY NOTICE: This e-mail may contain information that is privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient of this e-mail, please notify the sender immediately by return e-mail, purge it and do not disseminate or copy it. _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux

