LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-02-2010, 02:57 PM   #1
jmdennis1987
LQ Newbie
 
Registered: Nov 2010
Location: Vancouver, WA
Posts: 28

Rep: Reputation: 0
Is their a way to have dedicate a running task to a core?


Hi I am wondering if their is a code to start a terminal emulator dedicated to run off a pasific core.

i have a script wrote up that starts my servers. i run three game servers on a dual core system. their designed to run off one core.
in a terminal emulator. so is their a code i can add in my script that will tell it to use a pasific core? or another way?

i am useing opensuse 11.2 and gui kde

thanks for your help.
 
Old 12-02-2010, 03:10 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
Originally Posted by jmdennis1987 View Post
Hi I am wondering if their is a code to start a terminal emulator dedicated to run off a pasific core.

i have a script wrote up that starts my servers. i run three game servers on a dual core system. their designed to run off one core.
in a terminal emulator. so is their a code i can add in my script that will tell it to use a pasific core? or another way?

i am useing opensuse 11.2 and gui kde

thanks for your help.
use "taskset"

Quote:
taskset (core number) -p (process number)
so:

Quote:
taskset 1 -p 4129

Last edited by szboardstretcher; 12-02-2010 at 03:13 PM.
 
Old 12-02-2010, 03:13 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
its called "processor affinity" i think.
 
Old 12-02-2010, 04:28 PM   #4
jmdennis1987
LQ Newbie
 
Registered: Nov 2010
Location: Vancouver, WA
Posts: 28

Original Poster
Rep: Reputation: 0
use "taskset"

Quote:
taskset (core number) -p (process number)


hi thanks for your reply what if its not a process yet. like can i tell it to open a terminal and tun that terminal under core 1 and another terminal to run off core 2? i understand the code thanks. just wondering how i get the process number if its not running yet? or is it somethin im going to have to set after the servers are up and running?

thanks.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find what task is running on a particular cpu core ? summer_intern Linux - General 2 09-17-2010 09:29 PM
Logging off while running task Paulsuk Linux - Newbie 9 11-15-2006 08:21 AM
How to create Dedicate hosting server for our own? Khmer Linux - Newbie 1 09-01-2005 11:17 PM
Keep task running after logout Xzanron Linux - General 3 12-14-2004 02:44 PM
Having trouble running a task in the background 2016 Linux - Newbie 1 01-27-2002 12:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration