I have a server running Solaris OS. I want to bind number of processors to a certain process. I have tried following commands:
1) ps: to get process id.
bash-3.00$ ps -ef | grep java
bileng 10708 10695 3 12:20:59 pts/1 0:26 /opt/billengine/jdk1.6.0_29/bin/sparcv9/java -Dprogram.name=run.sh -Xloggc:./jb
2) psrinfo: to get the processor id.
bash-3.00$ /usr/sbin/psrinfo
0 on-line since 11/04/2013 16:22:17
1 on-line since 11/04/2013 16:22:18
2 on-line since 11/04/2013 16:22:18
3 on-line since 11/04/2013 16:22:18
4 on-line since 11/04/2013 16:22:18
5 on-line since 11/04/2013 16:22:18
6 on-line since 11/04/2013 16:22:18
7 on-line since 11/04/2013 16:22:18
3) pbind: to bind process to the processor.
I want to bind processor number 4 to 7 to a process id say 10708. Hence, I tried following command:
bash-3.00$ /usr/sbin/pbind -b 4-7 10708
/usr/sbin/pbind: invalid processor ID 4-7
4) However, when I try binding single processor id to a process id, then it works:
bash-3.00$ /usr/sbin/pbind -b 4 10708
process id 10708: was not bound, now 4
5) But my requirement is to bind multiple processors to a single process id.
I tried exploring all the man pages and documents, but unable get the clue.
Can anyone please suggest some pointers on the same.
Thanks.
The tool for doing this in Solaris is psrset
You create a processor set with
psrset -c 4-7
This will return the ID of the new processor set
created processor set ps_id
Then you can bind a process to a processor set with
psrset -b ps_id pid