Is there a simple script anyone could through out to me, to find the pid of a process given the name. I actually need to bind this pid to a processor set. I would probably put these comamns in a shell script which would have.
a) kick start the executable
b) get the pid
c) bind it to a specific processor set
second question is, would anyone know a way of getting the process ID inside a java program?
PS: SORRY, I accidentally posted this in the wrong topic. Should have been under Scripting & shell.
i am always working with pools to get more flexibility between the processor sets... like setting an own scheduler class for the sets or creating a "cpu-load balancing" between several sets....
btw:
short form of you 2 lines could be:
# psrset -b processor_set_id `pgrep myprocessname `
pressy..
is there a way I could inhinit a few of my processes to go on to a particular processor_set_id?
I mean I have a box with 24virtual cpus and have created 2 processor sets.
One with 3 and the other with 20.
I want the processor set with 20 vcpus to be running uninterrupted for a particular process. I have already bound them to the process. But while they sleep, probably some other processes stell the cpus. Can I avoid it?
sounds like you having fun with your 6core niagara Tx000
but yes, and that's the reason why i am using pools.... with the solaris resource management you can start processes inside a project and that project can use a defined pool with the "project.pool" attribute and that pool is associated to a processor set...
but why don't you use zones/container? that would be the best way to isolate the processes against each other and bind the CPUs to their environment...